Keep BASIC fixtures within the input line limit
All checks were successful
akbasic CI Build / cmake_build (push) Successful in 3m50s
akbasic CI Build / coverage (push) Successful in 4m4s
akbasic CI Build / sanitizers (push) Successful in 4m48s
akbasic CI Build / akgl_build (push) Successful in 9m55s
akbasic CI Build / mutation_test (push) Successful in 17m50s
All checks were successful
akbasic CI Build / cmake_build (push) Successful in 3m50s
akbasic CI Build / coverage (push) Successful in 4m4s
akbasic CI Build / sanitizers (push) Successful in 4m48s
akbasic CI Build / akgl_build (push) Successful in 9m55s
akbasic CI Build / mutation_test (push) Successful in 17m50s
Reflow the approved reference cases, shorten local fixture comments, and split the executable docs line so the 80-byte input buffer can read every source line. Co-authored-by: andrew <andrew@aklabs.net>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
10 REM A DEF call takes its environment from the pool, one per call, exactly as
|
||||
10 REM A DEF call takes an environment from the pool, one per call, exactly as
|
||||
20 REM GOSUB does. It used to be owned by the funcdef and reset on every call,
|
||||
30 REM which cost two silent defects: two calls in one expression shared a slot,
|
||||
30 REM which cost two silent defects: two calls shared a slot,
|
||||
40 REM and recursion never came back at all.
|
||||
50 DEF FACT(N#)
|
||||
60 IF N# <= 1 THEN RETURN 1
|
||||
@@ -15,9 +15,9 @@
|
||||
150 DEF DBL(N#) = N# * 2
|
||||
160 PRINT DBL(10) + DBL(1)
|
||||
170 PRINT DBL(1) + DBL(10) + DBL(100)
|
||||
180 REM Depth answers to the environment pool now, so runaway recursion reports
|
||||
190 REM "Environment pool exhausted" rather than hanging. It is not exercised here
|
||||
200 REM because the statement containing a failed call still prints a junk value
|
||||
210 REM afterwards -- a separate, pre-existing defect recorded in TODO.md, and one
|
||||
220 REM this golden file would pin if it went in. tests/user_functions.c asserts
|
||||
180 REM Depth answers to the pool, so runaway recursion reports
|
||||
190 REM "Environment pool exhausted" rather than hanging. It is not exercised
|
||||
200 REM here because a failed call's statement still prints a junk value
|
||||
210 REM afterwards -- a TODO.md defect this file would pin
|
||||
220 REM if it went in. tests/user_functions.c asserts
|
||||
230 REM the message instead.
|
||||
|
||||
Reference in New Issue
Block a user