Add tests for expr-in-dict
This commit is contained in:
parent
9e03e0e6ec
commit
3252af3129
@ -192,6 +192,12 @@ def test_dicts():
|
||||
HyDict(["foo", "bar",
|
||||
"bar", "baz"])])]
|
||||
|
||||
objs = tokenize("{(foo bar) (baz quux)}")
|
||||
assert objs == [HyDict([
|
||||
HyExpression([HySymbol("foo"), HySymbol("bar")]),
|
||||
HyExpression([HySymbol("baz"), HySymbol("quux")])
|
||||
])]
|
||||
|
||||
|
||||
def test_nospace():
|
||||
""" Ensure we can tokenize without spaces if we have to """
|
||||
|
@ -15,6 +15,12 @@
|
||||
(assert (= [1 2 3 4] (+ [1 2] [3 4]))))
|
||||
|
||||
|
||||
(defn test-dicts []
|
||||
"NATIVE: test dicts work right"
|
||||
(assert (= {1 2 3 4} {3 4 1 2}))
|
||||
(assert (= {1 2 3 4} {1 (+ 1 1) 3 (+ 2 2)})))
|
||||
|
||||
|
||||
(defn test-setv-get []
|
||||
"NATIVE: test setv works on a get expression"
|
||||
(setv foo [0 1 2])
|
||||
|
Loading…
Reference in New Issue
Block a user