ocaml: phase 1 unit/wildcard params + 180s timeout (+5 tests, 283 total)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 34s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 34s
Parser: try-consume-param! handles ident, wildcard _ (fresh __wild_N name), unit () (fresh __unit_N), typed (x : T) (skips signature). parse-fun and parse-let (inline) reuse the helper; top-level parse-decl-let inlines a similar test. test.sh timeout bumped from 60s to 180s — the growing suite was hitting the cap and reporting spurious failures.
This commit is contained in:
@@ -702,9 +702,21 @@ cat > "$TMPFILE" << 'EPOCHS'
|
||||
(epoch 974)
|
||||
(eval "(ocaml-run \"Int.min 7 3\")")
|
||||
|
||||
;; ── Unit / wildcard parameters ──────────────────────────────────
|
||||
(epoch 1000)
|
||||
(eval "(ocaml-run \"let f () = 42 in f ()\")")
|
||||
(epoch 1001)
|
||||
(eval "(ocaml-run \"(fun () -> 99) ()\")")
|
||||
(epoch 1002)
|
||||
(eval "(ocaml-run \"let f _ = 1 in f 5\")")
|
||||
(epoch 1003)
|
||||
(eval "(ocaml-run-program \"let f () = 7;; f ()\")")
|
||||
(epoch 1004)
|
||||
(eval "(ocaml-run-program \"let g _ x = x + 1;; g 99 41\")")
|
||||
|
||||
EPOCHS
|
||||
|
||||
OUTPUT=$(timeout 60 "$SX_SERVER" < "$TMPFILE" 2>/dev/null)
|
||||
OUTPUT=$(timeout 180 "$SX_SERVER" < "$TMPFILE" 2>/dev/null)
|
||||
|
||||
check() {
|
||||
local epoch="$1" desc="$2" expected="$3"
|
||||
@@ -1112,6 +1124,13 @@ check 972 "Int.abs -5" '5'
|
||||
check 973 "Int.max" '7'
|
||||
check 974 "Int.min" '3'
|
||||
|
||||
# ── Unit / wildcard parameters ──────────────────────────────────
|
||||
check 1000 "let f () = 42 in f ()" '42'
|
||||
check 1001 "(fun () -> 99) ()" '99'
|
||||
check 1002 "let f _ = 1 in f 5" '1'
|
||||
check 1003 "top-level let f () =" '7'
|
||||
check 1004 "wildcard top-level" '42'
|
||||
|
||||
TOTAL=$((PASS + FAIL))
|
||||
if [ $FAIL -eq 0 ]; then
|
||||
echo "ok $PASS/$TOTAL OCaml-on-SX tests passed"
|
||||
|
||||
Reference in New Issue
Block a user