(use ../src/jolt/api) (defn ct-eval [ctx s] (eval-string ctx s)) (print "=== CLJS Ported Part 3b ===") (print "21: clojure.string...") (let [ctx (init)] (load-string ctx (slurp "src/jolt/clojure/string.clj")) (assert (= true (ct-eval ctx "(blank? nil)")) "blank? nil") (assert (= true (ct-eval ctx "(blank? \" \")")) "blank? spaces") (assert (= "Abc" (ct-eval ctx "(capitalize \"abc\")")) "capitalize") (assert (= "hello" (ct-eval ctx "(lower-case \"HELLO\")")) "lower-case") (assert (= "hello" (ct-eval ctx "(trim \" hello \")")) "trim")) (print " passed") (print "22: clojure.set...") (let [ctx (init)] (load-string ctx (slurp "src/jolt/clojure/set.clj")) (assert (= 3 (ct-eval ctx "(count (union #{1 2} #{2 3}))")) "union") (assert (= 1 (ct-eval ctx "(count (intersection #{1 2} #{2 3}))")) "intersection") (assert (= 1 (ct-eval ctx "(count (difference #{1 2} #{2 3}))")) "difference")) (print " passed") (print "\nAll CLJS Ported Part 3 tests passed!") (print "\nAll CLJS Ported Part 3b tests passed!")