tests: add tests for nil hashmap values
authorDov Murik <dov.murik@gmail.com>
Wed, 2 Dec 2015 18:12:56 +0000 (13:12 -0500)
committerDov Murik <dov.murik@gmail.com>
Wed, 2 Dec 2015 20:52:32 +0000 (15:52 -0500)
tests/step9_try.mal

index ec5a1df..b18173c 100644 (file)
 (keyword? (nth (vals {"a" :abc "b" :def}) 0))
 ;=>true
 
+;; Testing nil as hash-map values
+(contains? {:abc nil} :abc)
+;=>true
+(assoc {} :bcd nil)
+;=>{:bcd nil}
+(dissoc {:cde nil :fgh 456} :cde)
+;=>{:fgh 456}
 
 ;; ------- Optional Functionality --------------
 ;; ------- (Not needed for self-hosting) -------