ValueScript
ValueScript copied to clipboard
Add an input test case
Input test cases for ValueScript are really simple.
All you have to do is write a program like this:
// test_output! "Hello world!"
export default function() {
return "Hello world!";
}
and save it in inputs/passing or inputs/failing.
Passing means the program behaves as intended, failing means it does something else.
If your program throws an exception or otherwise panics, you can't use test_output!, but adding these programs is still very important.
If your program does run to completion, even if the output is wrong, use test_output! and include the incorrect output. Add a comment below that saying what the output should be instead.
(By the way, exceptions shouldn't panic... they just currently do.)