Added primitive automated unit tests for salient, use the salient test command, then list all of the files or folders you want to test over. It will then look for all .test.sa files and compile the unit tests, then run them and validate they all return true.
Example test unit test file:
fn fib_recur(n: i32): i32 {
if n <= 1 { return n; };
return fib_recur(n - 1) + fib_recur(n - 2);
}
test "fibonacci recursive call" {
if fib_recur(3) != 2 { return false; };
return true;
}
Added primitive automated unit tests for salient, use the
salient test
command, then list all of the files or folders you want to test over. It will then look for all.test.sa
files and compile the unit tests, then run them and validate they all return true.Example test unit test file: