Fix last 2 foreign-type-checking tests: ListRef match + #t→true
- run_tests.ml: foreign-check-args binding now matches ListRef (from the list primitive) in addition to List - test-foreign.sx: replace #t with true in guard clauses — SX parser treats #t as a symbol, not a boolean 2800/2800 tests, zero failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -165,7 +165,7 @@
|
||||
(deftest
|
||||
"foreign-check-args rejects wrong type"
|
||||
(let
|
||||
((err (guard (e (#t (error-message e))) (foreign-check-args "test" (list {:type "number" :name "x"}) (list "not-a-number")) nil)))
|
||||
((err (guard (e (true (error-message e))) (foreign-check-args "test" (list {:type "number" :name "x"}) (list "not-a-number")) nil)))
|
||||
(assert (contains? err "expected number"))))
|
||||
(deftest
|
||||
"foreign-check-args accepts any type"
|
||||
@@ -175,5 +175,5 @@
|
||||
(deftest
|
||||
"foreign-check-args rejects too few args"
|
||||
(let
|
||||
((err (guard (e (#t (error-message e))) (foreign-check-args "test" (list {:type "number" :name "x"} {:type "number" :name "y"}) (list 1)) nil)))
|
||||
((err (guard (e (true (error-message e))) (foreign-check-args "test" (list {:type "number" :name "x"} {:type "number" :name "y"}) (list 1)) nil)))
|
||||
(assert (contains? err "expected 2 args")))))
|
||||
Reference in New Issue
Block a user