Added testing! call kraken like so ./kraken --test ../path/to/test/name_of_test_without_extention This will make kraken compile and run name_of_test_without_extention.krak and compare the output it generates on stdout to name_of_test_without_extention.expected_results. If they pass, then it records the pass, if not, it records the failure and saves the intermediate files generated. It has revealed some bugs which I will fix in upcoming commits.

This commit is contained in:
Nathan Braswell
2014-05-20 22:21:07 -04:00
parent 39f945940d
commit 2566cbb67c
26 changed files with 430 additions and 2 deletions

14
tests/RecursiveTest.krak Normal file
View File

@@ -0,0 +1,14 @@
import io;
int fibanacci(int num) {
if (num < 2)
return 1;
return fibanacci(num-1) + fibanacci(num-2);
}
int main() {
print(fibanacci(4));
print("\n");
return 0;
}