Phase 7 followup: set equality in core-= + phs-to-struct
- phm.janet: add phs-to-struct (converts set to struct via phm-to-struct)
- core.janet: core-= now handles set? with phs-to-struct normalization
- test/phase7-test.janet: add (= #{1 2 3} #{3 2 1}) assertion
- 315 ok, 2 fail (pre-existing, unchanged)
This commit is contained in:
parent
fe22fea3e4
commit
6c9e0c922d
3 changed files with 9 additions and 3 deletions
|
|
@ -19,7 +19,7 @@
|
|||
(assert (= false (ct-eval ctx "(set? [1 2 3])")) "set? false")
|
||||
(assert (= 4 (ct-eval ctx "(count (conj #{1 2 3} 4))")) "conj add")
|
||||
(assert (= 2 (ct-eval ctx "(count (disj #{1 2 3} 3))")) "disj")
|
||||
(assert (= 3 (ct-eval ctx "(count #{1 2 3})")) "count"))
|
||||
(print " passed")
|
||||
(assert (= 3 (ct-eval ctx "(count #{1 2 3})")) "count")
|
||||
(assert (= true (ct-eval ctx "(= #{1 2 3} #{3 2 1})")) "= order-independent"))
|
||||
|
||||
(print "\nAll Phase 7 tests passed!")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue