Interop now working. Not all tests pass.
This commit is contained in:
parent
d6801ee443
commit
971a86e384
5 changed files with 131 additions and 85 deletions
|
|
@ -51,6 +51,21 @@
|
|||
actual (ATOM? (gsp "(A B C D)"))]
|
||||
(is (= actual expected) "A list is explicitly not an atom"))))
|
||||
|
||||
(deftest numberp-tests
|
||||
(testing "NUMBERP"
|
||||
(let [expected T
|
||||
actual (NUMBERP 7)]
|
||||
(is (= actual expected) "7 is a number"))
|
||||
(let [expected T
|
||||
actual (NUMBERP 3.14)]
|
||||
(is (= actual expected) "3.14 is a number"))
|
||||
(let [expected F
|
||||
actual (NUMBERP NIL)]
|
||||
(is (= actual expected) "NIL is not a number"))
|
||||
(let [expected F
|
||||
actual (NUMBERP (gsp "HELLO"))]
|
||||
(is (= actual expected) "HELLO is not a number"))))
|
||||
|
||||
(deftest access-function-tests
|
||||
(testing "CAR"
|
||||
(let [expected 'A
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@
|
|||
|
||||
(deftest interop-test
|
||||
(testing "INTEROP called from Clojure"
|
||||
(let [expected '123
|
||||
(let [expected (symbol "123")
|
||||
actual (INTEROP (gsp "(CLOJURE CORE STR)") (gsp "(1 2 3)"))]
|
||||
(is (= actual expected))))
|
||||
(testing "INTEROP called from Lisp"
|
||||
(let [expected 'ABC
|
||||
actual (EVAL (gsp "(INTEROP '(CLOJURE CORE STR) '('A 'B 'C)"))]
|
||||
actual (EVAL (INTEROP '(CLOJURE CORE STR) '('A 'B 'C)) '())]
|
||||
(is (= actual expected))))
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue