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:
2026-07-04 04:39:23 +00:00
parent 8ba68e0365
commit 59adee0d2b
8 changed files with 52 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
> can-map-an-array
hs-compat-asExpression > converts-a-complete-form-into-values
hs-compat-asExpression > converts-strings-into-fragments
hs-compat-asExpression > converts-value-as-json
hs-compat-blockLiteral > can-map-an-array
hs-compat-in > basic-no-query-return-values
hs-compat-typecheck > can-do-basic-non-string-typecheck-failure
hs-compat-typecheck > can-do-basic-string-non-null-typecheck
@@ -270,4 +270,4 @@ hs-upstream-wait > can wait on event
hs-upstream-wait > can wait on event on another element
hs-upstream-wait > waiting on an event sets 'it' to the event
hs-upstream-when > attribute observers are persistent (not recreated on re-run)
> string->number
math > string->number

View File

@@ -1,3 +1,5 @@
(defsuite "chars"
;; Tests for character type (Phase 13)
;; Uses (make-char n) and (char-code "x") instead of #\x literals
;; (char literal parser syntax tested via sx-parse call)
@@ -183,3 +185,5 @@
(deftest
"char-ci>=? equal case-insensitive"
(assert= true (char-ci>=? (make-char 97) (make-char 65))))
)

View File

@@ -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"

View File

@@ -1,3 +1,5 @@
(defsuite "import-bind"
;; Tests for define-library, import, and the import suspension mechanism
;; ============================================================
@@ -190,3 +192,5 @@
(assert=
(cek-try (fn () inner-secret) (fn (e) "not-found"))
"not-found"))
)

View File

@@ -1,3 +1,5 @@
(defsuite "let-match"
;; Tests for let-match — CEK special form and bytecode compiler desugaring
;; let-match destructures a dict: (let-match {:key var} expr body...)
@@ -45,3 +47,5 @@
(let-match {:a a :b b} (dict :a (+ 1 2) :b (* 3 4))
(assert= a 3)
(assert= b 12)))
)

View File

@@ -1,7 +1,10 @@
;; Math completeness tests. C9 note: this file used NESTED deftests with no
;; defsuite, so every test reported with an empty suite label (" > sin").
;; Restructured to defsuite/deftest — labels are now "math > sin" etc.
(deftest
"math completeness"
(deftest
(defsuite
"math"
(defsuite
"trigonometry"
(deftest
"sin"
@@ -124,7 +127,10 @@
true
(< (abs (- (cos (acos 0.5)) 0.5)) 0.0001)
"cos(acos(x)) = x")
(assert= true (< (abs (- (exp (log 2)) 2)) 0.0001) "exp(log(x)) = x")
(assert=
true
(< (abs (- (exp (log 2)) 2)) 0.0001)
"exp(log(x)) = x")
(assert=
(* 12 18)
(* (gcd 12 18) (lcm 12 18))

View File

@@ -1,3 +1,5 @@
(defsuite "ports"
;; Phase 14 — String ports + eof-object
(deftest
@@ -230,3 +232,5 @@
(c3 (read-char in))
(when (not (eof-object? c3)) (write-char c3 out)))
(assert= "abc" (get-output-string out) "roundtrip via ports")))))
)