jolt/test/spec
Yogthos 0db7eb6ac8 fix: value-semantics for collection keys/elements; set literals evaluate
Close jolt-do7. Maps/sets keyed by a collection (a map, vector, ...) now compare
by value instead of Janet identity:
- PHM/PHS hash and compare keys through an injected canonicalizer (collection
  keys -> value-hashable struct/tuple); keys are still stored as-is
- map literals and core-assoc promote to a phm when a key is a collection
- frequencies/group-by use a phm base so collection elements/keys dedup by value
- set equality is value-based (from earlier)

Real bugs found and fixed along the way:
- set literals #{(inc 1)} did not evaluate their elements (stored raw forms!)
- the REPL printer rendered phm maps as {} (they hit the deftype branch); now a
  phm branch prints entries

Added spec cases (maps/collection-keys, sets/literals & value elements).
conformance 218/218, jpm test green.
2026-06-05 01:02:00 -04:00
..
control-flow-spec.janet test(spec): control-flow, functions, destructuring — fix loop destructuring 2026-06-05 00:16:15 -04:00
destructuring-spec.janet test(spec): control-flow, functions, destructuring — fix loop destructuring 2026-06-05 00:16:15 -04:00
functions-spec.janet test(spec): control-flow, functions, destructuring — fix loop destructuring 2026-06-05 00:16:15 -04:00
host-interop-spec.janet test(spec): macros, reader, host-interop, namespaces — fix def-doc, resolve, %& 2026-06-05 00:35:48 -04:00
lazy-seqs-spec.janet test(spec): lazy sequences, transducers, metadata 2026-06-05 00:26:44 -04:00
lists-spec.janet test(spec): collections contract (sequences, vectors, lists, maps, sets) 2026-06-05 00:08:37 -04:00
macros-spec.janet test(spec): macros, reader, host-interop, namespaces — fix def-doc, resolve, %& 2026-06-05 00:35:48 -04:00
maps-spec.janet fix: value-semantics for collection keys/elements; set literals evaluate 2026-06-05 01:02:00 -04:00
metadata-spec.janet test(spec): lazy sequences, transducers, metadata 2026-06-05 00:26:44 -04:00
multimethods-spec.janet test(spec): state, multimethods, protocols — fix reify, get-method, hierarchies 2026-06-05 00:24:18 -04:00
namespaces-spec.janet test(spec): macros, reader, host-interop, namespaces — fix def-doc, resolve, %& 2026-06-05 00:35:48 -04:00
numbers-spec.janet test(spec): numbers, strings, predicates — fix variadic <, seq?, index-of 2026-06-05 00:13:19 -04:00
predicates-spec.janet test(spec): numbers, strings, predicates — fix variadic <, seq?, index-of 2026-06-05 00:13:19 -04:00
protocols-spec.janet test(spec): state, multimethods, protocols — fix reify, get-method, hierarchies 2026-06-05 00:24:18 -04:00
reader-syntax-spec.janet test(spec): macros, reader, host-interop, namespaces — fix def-doc, resolve, %& 2026-06-05 00:35:48 -04:00
sequences-spec.janet test(spec): collections contract (sequences, vectors, lists, maps, sets) 2026-06-05 00:08:37 -04:00
sets-spec.janet fix: value-semantics for collection keys/elements; set literals evaluate 2026-06-05 01:02:00 -04:00
state-spec.janet test(spec): state, multimethods, protocols — fix reify, get-method, hierarchies 2026-06-05 00:24:18 -04:00
strings-spec.janet test(spec): numbers, strings, predicates — fix variadic <, seq?, index-of 2026-06-05 00:13:19 -04:00
transducers-spec.janet test(spec): lazy sequences, transducers, metadata 2026-06-05 00:26:44 -04:00
vectors-spec.janet test(spec): collections contract (sequences, vectors, lists, maps, sets) 2026-06-05 00:08:37 -04:00