~subsetpark/ec

ref: 0f5a4a72ac5c34a153a2534fbf32ae55c27109a1 ec/test/compose.janet -rw-r--r-- 406 bytes
0f5a4a72 — Zach Smith Regularlize get-shape 1 year, 2 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!)