1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-19 17:47:53 +03:00

Test that (= [] (vector)) and (= {} (hash-map)) are both true

The latter suggested by @dubek.  The first an obvious extension.
This commit is contained in:
Ben Harris 2020-06-22 00:29:55 +01:00 committed by Joel Martin
parent b012e8f8e6
commit f1c1cde289

View File

@ -174,6 +174,8 @@
;=>false ;=>false
(vector 3 4 5) (vector 3 4 5)
;=>[3 4 5] ;=>[3 4 5]
(= [] (vector))
;=>true
(map? {}) (map? {})
;=>true ;=>true
@ -369,6 +371,8 @@
;; Testing equality of hash-maps ;; Testing equality of hash-maps
(= {} {}) (= {} {})
;=>true ;=>true
(= {} (hash-map))
;=>true
(= {:a 11 :b 22} (hash-map :b 22 :a 11)) (= {:a 11 :b 22} (hash-map :b 22 :a 11))
;=>true ;=>true
(= {:a 11 :b [22 33]} (hash-map :b [22 33] :a 11)) (= {:a 11 :b [22 33]} (hash-map :b [22 33] :a 11))