From 12d72afa5a86f4934525ea62544ffb6068ed611d Mon Sep 17 00:00:00 2001 From: gered Date: Sun, 2 Mar 2014 10:34:29 -0500 Subject: [PATCH] update tests --- test/clj_jtwig/core_test.clj | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/clj_jtwig/core_test.clj b/test/clj_jtwig/core_test.clj index 66015b2..521e6ff 100644 --- a/test/clj_jtwig/core_test.clj +++ b/test/clj_jtwig/core_test.clj @@ -213,16 +213,16 @@ "java.lang.Boolean") "boolean typename via model-map") (is (= (render "{{typename(x)}}" {:x '(1 2 3 4 5)}) - "clojure.lang.PersistentList") + "clojure.lang.LazySeq") "list typename via model-map") (is (= (render "{{typename(x)}}" {:x [1 2 3 4 5]}) - "clojure.lang.PersistentVector") + "clojure.lang.LazySeq") "vector typename via model-map") (is (= (render "{{typename(x)}}" {:x {:a 1 :b "foo" :c nil}}) "clojure.lang.PersistentArrayMap") "map typename via model-map") (is (= (render "{{typename(x)}}" {:x #{1 2 3 4 5}}) - "clojure.lang.PersistentHashSet") + "clojure.lang.LazySeq") "set typename via model-map") ; verify that the clojure function recognizes the correct types when the variable is passed via a constant @@ -243,13 +243,13 @@ "java.lang.Boolean") "boolean typename via constant value embedded in the template") (is (= (render "{{typename([1, 2, 3, 4, 5])}}" nil) - "java.util.ArrayList") + "clojure.lang.LazySeq") "list typename via constant value embedded in the template") (is (= (render "{{typename(1..5)}}" nil) - "java.util.ArrayList") + "clojure.lang.LazySeq") "vector typename via constant value embedded in the template") (is (= (render "{{typename({a: 1, b: 'foo', c: null})}}" nil) - "java.util.HashMap") + "clojure.lang.PersistentArrayMap") "map typename via constant value embedded in the template") ; simple passing / returning... not doing anything exciting with the arguments @@ -270,16 +270,16 @@ "true") "boolean via model-map") (is (= (render "{{identity(x)}}" {:x '(1 2 3 4 5)}) - "(1 2 3 4 5)") + "[1, 2, 3, 4, 5]") "list via model-map") (is (= (render "{{identity(x)}}" {:x [1 2 3 4 5]}) - "[1 2 3 4 5]") + "[1, 2, 3, 4, 5]") "vector via model-map") (is (= (render "{{identity(x)}}" {:x {:a 1 :b "foo" :c nil}}) - "{\"a\" 1, \"c\" nil, \"b\" \"foo\"}") + "{b=foo, c=null, a=1}") "map via model-map") (is (= (render "{{identity(x)}}" {:x #{1 2 3 4 5}}) - "#{1 2 3 4 5}") + "[1, 2, 3, 4, 5]") "set via model-map") ; simple passing / returning... not doing anything exciting with the arguments @@ -318,7 +318,7 @@ "1 2 3 4 5 ") "vector (iterating over a model-map var passed to a function and returned from it)") (is (= (render "{% for k, v in identity(x) %}{{k}}: {{v}} {% endfor %}" {:x {:a 1 :b "foo" :c nil}}) - "a: 1 c: null b: foo ") + "b: foo c: null a: 1 ") "map (iterating over a model-map var passed to a function and returned from it)") (is (= (render "{% for i in identity(x) %}{{i}} {% endfor %}" {:x #{1 2 3 4 5}}) "1 2 3 4 5 ")