Add type and range checks to Timer.sleep() in both C source and Wren implementation, aborting with descriptive errors for non-numeric or negative arguments. Introduce six new test files covering sleep with fibers, float durations, main fiber, zero milliseconds, negative values, and non-numeric input. Fix stack trace parsing in test runner to skip builtin library frames by iterating through error lines until a main-line match is found.
4 lines
101 B
Plaintext
4 lines
101 B
Plaintext
import "timer" for Timer
|
|
|
|
Timer.sleep("wat") // expect runtime error: Milliseconds must be a number.
|