Testing
Mark a top-level function with #test and run it with gray test. Test functions take no parameters, return nothing, and are stripped from normal builds.
do add(a i64, b i64) -> i64 { return a + b}
#testdo test_add() { assert(add(2, 3) == 5) assert(add(-1, 1) == 0)}
do main() { println(add(1, 2))}gray test Run every #test function under the current directorygray test file.gray Run the tests in one filegray test ./src/... Run the tests in every file under a directoryA failed assert or any runtime panic is recorded as a failure and the runner moves on to the next test. gray test exits non-zero if any test fails.