W14: C9 eliminate empty suite labels (test-only) — section E complete
The finding ("spec suites print with empty suite label") was six files
wide: test-chars (43 suite-less top-level deftests), test-import-bind
(14), test-ports (12), test-let-match (8), test-math (deftests NESTED in
deftests — every test reported as " > sin"), and 4 stray deftests between
suites in test-hyperscript-conformance.
Fixes: file-level defsuite wraps for the four flat files (mechanical wrap,
sx_validate-checked); test-math restructured deftest->defsuite ("math >
string->number"); hs strays wrapped in suites named for their section
comments (hs-compat-blockLiteral/cookies/some/where). The two
baseline-visible identities are renamed in spec/tests/known-failures.txt
in this same commit — the F10 gate enforces exactly this coupling.
Full baseline gate validated GREEN: 5798p/273f, fail set identical
(the -2 passes are the two wrapper deftests that no longer self-report
a vacuous PASS around their children).
Test-only: no semantics edits, no push.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -180,11 +180,12 @@
|
||||
(deftest "converts-foo-bar" (for-each run-hs-fixture (list {:src "1 as String" :expected "1"}))))
|
||||
|
||||
;; ── blockLiteral (4 fixtures) ──────────────────────────────
|
||||
(defsuite "hs-compat-blockLiteral"
|
||||
(deftest
|
||||
"can-map-an-array"
|
||||
(let
|
||||
((r (eval-hs "['a', 'ab', 'abc'].map(\\ s -> s.length)")))
|
||||
(assert= r (list 1 2 3) "map with block")))
|
||||
(assert= r (list 1 2 3) "map with block"))))
|
||||
|
||||
;; ── boolean (2 fixtures) ──────────────────────────────
|
||||
(defsuite
|
||||
@@ -325,9 +326,10 @@
|
||||
(for-each run-hs-fixture (list {:src "undefined does not exist" :expected true} {:src "null does not exist" :expected true}))))
|
||||
|
||||
;; ── cookies (9 fixtures) ──────────────────────────────
|
||||
(defsuite "hs-compat-cookies"
|
||||
(deftest
|
||||
"update-cookie-values-work"
|
||||
(for-each run-hs-fixture (list {:src "cookies.foo" :locals {:cookies {:foo "doh"}} :expected "doh"})))
|
||||
(for-each run-hs-fixture (list {:src "cookies.foo" :locals {:cookies {:foo "doh"}} :expected "doh"}))))
|
||||
|
||||
;; ── in (4 fixtures) ──────────────────────────────
|
||||
(defsuite
|
||||
@@ -464,9 +466,10 @@
|
||||
(assert= (len r) 0 "empty query result"))))
|
||||
|
||||
;; ── some (6 fixtures) ──────────────────────────────
|
||||
(defsuite "hs-compat-some"
|
||||
(deftest
|
||||
"some-returns-true-for-nonempty-selector"
|
||||
(for-each run-hs-fixture (list {:src "some [1]" :expected true})))
|
||||
(for-each run-hs-fixture (list {:src "some [1]" :expected true}))))
|
||||
|
||||
;; ── stringPostfix (10 fixtures) ──────────────────────────────
|
||||
(defsuite
|
||||
@@ -695,13 +698,14 @@
|
||||
(deftest "null-not-exist" (for-each run-hs-fixture (list {:src "null does not exist" :expected true})))
|
||||
(deftest "undef-not-exist" (for-each run-hs-fixture (list {:src "undefined does not exist" :locals {:undefined nil} :expected true}))))
|
||||
|
||||
(defsuite "hs-compat-where"
|
||||
(deftest
|
||||
"where-with-property"
|
||||
(let
|
||||
((items (list {:age 15 :name "Alice"} {:age 30 :name "Bob"})))
|
||||
(let
|
||||
((r (eval-hs "items where its age > 20" {:locals {:items items}})))
|
||||
(assert= (len r) 1 "one match"))))
|
||||
(assert= (len r) 1 "one match")))))
|
||||
|
||||
(defsuite
|
||||
"hs-0990-collection-ops"
|
||||
|
||||
Reference in New Issue
Block a user