1.2 KiB
1.2 KiB
tests
tests are written in src/test
- tests that test the language will be in the lang subdirectory
- tests that test lily will be in the lily subdirectory
- all tests should return a
u8
as a status code.follow standard status code practices for value.
0
for success,1
for error, etc - all tests should contain the test specification at the top of the file
- all test arguments are optional
tests with no arguments will always pass
- delimiting whitespace is optional, provided each test argument is prepended with a newline and a
*
timeout
is formatted like0.5s
. if a test exceeds this time, it will fail.args
are given to the application executableexit
is the exit status of the program (return code)
- all test arguments are optional
- if test compilation fails, the test will be considered failed
the following are all of the (currently) supported test arguments:
/*
* exit: u8
* args: str
* stdout: str
* timeout: time
*/
a trivial example test:
/*
* timeout: 0.5s
*/
main := fn(): void {
// test will fail after 0.5s
loop {}
}