todo comments regarding testing hashmap values
This commit is contained in:
parent
12d72afa5a
commit
56d966429d
|
@ -275,6 +275,7 @@
|
||||||
(is (= (render "{{identity(x)}}" {:x [1 2 3 4 5]})
|
(is (= (render "{{identity(x)}}" {:x [1 2 3 4 5]})
|
||||||
"[1, 2, 3, 4, 5]")
|
"[1, 2, 3, 4, 5]")
|
||||||
"vector via model-map")
|
"vector via model-map")
|
||||||
|
; TODO: order of iteration through a map is undefined, the string being tested may not always be the same (wrt. order)
|
||||||
(is (= (render "{{identity(x)}}" {:x {:a 1 :b "foo" :c nil}})
|
(is (= (render "{{identity(x)}}" {:x {:a 1 :b "foo" :c nil}})
|
||||||
"{b=foo, c=null, a=1}")
|
"{b=foo, c=null, a=1}")
|
||||||
"map via model-map")
|
"map via model-map")
|
||||||
|
@ -305,6 +306,7 @@
|
||||||
(is (= (render "{{identity(1..5)}}" nil)
|
(is (= (render "{{identity(1..5)}}" nil)
|
||||||
"[1, 2, 3, 4, 5]")
|
"[1, 2, 3, 4, 5]")
|
||||||
"list by comprehension via constant value embedded in the template")
|
"list by comprehension via constant value embedded in the template")
|
||||||
|
; TODO: order of iteration through a map is undefined, the string being tested may not always be the same (wrt. order)
|
||||||
(is (= (render "{{identity({a: 1, b: 'foo', c: null})}}" nil)
|
(is (= (render "{{identity({a: 1, b: 'foo', c: null})}}" nil)
|
||||||
"{b=foo, c=null, a=1}")
|
"{b=foo, c=null, a=1}")
|
||||||
"map via constant value embedded in the template")
|
"map via constant value embedded in the template")
|
||||||
|
@ -317,6 +319,7 @@
|
||||||
(is (= (render "{% for i in identity(x) %}{{i}} {% endfor %}" {:x [1 2 3 4 5]})
|
(is (= (render "{% for i in identity(x) %}{{i}} {% endfor %}" {:x [1 2 3 4 5]})
|
||||||
"1 2 3 4 5 ")
|
"1 2 3 4 5 ")
|
||||||
"vector (iterating over a model-map var passed to a function and returned from it)")
|
"vector (iterating over a model-map var passed to a function and returned from it)")
|
||||||
|
; TODO: order of iteration through a map is undefined, the string being tested may not always be the same (wrt. order)
|
||||||
(is (= (render "{% for k, v in identity(x) %}{{k}}: {{v}} {% endfor %}" {:x {:a 1 :b "foo" :c nil}})
|
(is (= (render "{% for k, v in identity(x) %}{{k}}: {{v}} {% endfor %}" {:x {:a 1 :b "foo" :c nil}})
|
||||||
"b: foo c: null a: 1 ")
|
"b: foo c: null a: 1 ")
|
||||||
"map (iterating over a model-map var passed to a function and returned from it)")
|
"map (iterating over a model-map var passed to a function and returned from it)")
|
||||||
|
@ -332,6 +335,7 @@
|
||||||
(is (= (render "{% for i in identity(1..5) %}{{i}} {% endfor %}" nil)
|
(is (= (render "{% for i in identity(1..5) %}{{i}} {% endfor %}" nil)
|
||||||
"1 2 3 4 5 ")
|
"1 2 3 4 5 ")
|
||||||
"list by comprehension (iterating over a model-map var passed to a function and returned from it)")
|
"list by comprehension (iterating over a model-map var passed to a function and returned from it)")
|
||||||
|
; TODO: order of iteration through a map is undefined, the string being tested may not always be the same (wrt. order)
|
||||||
(is (= (render "{% for k, v in identity({a: 1, b: 'foo', c: null}) %}{{k}}: {{v}} {% endfor %}" nil)
|
(is (= (render "{% for k, v in identity({a: 1, b: 'foo', c: null}) %}{{k}}: {{v}} {% endfor %}" nil)
|
||||||
"b: foo c: null a: 1 ")
|
"b: foo c: null a: 1 ")
|
||||||
"map (iterating over a model-map var passed to a function and returned from it)")
|
"map (iterating over a model-map var passed to a function and returned from it)")
|
||||||
|
|
Reference in a new issue