~subsetpark/ec

ref: big ec/test/compose.janet -rw-r--r-- 406 bytes
3f9b6ebe — Zach Smith Support bigints (note: this does not work on account of floats being coerced to big ints) 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(import /src/calc)
(import /src/parser)
(import /src/env)

(import /src/operations :prefix "o/")
(import /src/adverbs :prefix "a/")

(use testament)
(use /test-support)

(deftest dip
  (let [s (env/new-env)
        in (parser/parse "2 3 4 (+) dip")]
    (eval-all s in)
    (let [four (calc/pop s)
          five (calc/pop s)]
      (is (= 4 (four :value)))
      (is (= 5 (five :value))))))

(run-tests!)