diff options
-rwxr-xr-x | Makefile | 3 | ||||
-rw-r--r-- | tests/arithmetic_expected.txt | 9 |
2 files changed, 12 insertions, 0 deletions
@@ -46,6 +46,9 @@ $(BUILD_DIR): tools | |||
46 | run: $(BIN) | 46 | run: $(BIN) |
47 | ./$(BIN) -i | 47 | ./$(BIN) -i |
48 | 48 | ||
49 | tests: $(BIN) | ||
50 | ./$(BIN) examples/arithmetic.bdl | diff tests/arithmetic_expected.txt - | ||
51 | |||
49 | # Remove build directory. | 52 | # Remove build directory. |
50 | clean: | 53 | clean: |
51 | rm -rf $(BUILD_DIR) | 54 | rm -rf $(BUILD_DIR) |
diff --git a/tests/arithmetic_expected.txt b/tests/arithmetic_expected.txt new file mode 100644 index 0000000..590166a --- /dev/null +++ b/tests/arithmetic_expected.txt | |||
@@ -0,0 +1,9 @@ | |||
1 | 110 | ||
2 | 6 | ||
3 | 25 | ||
4 | -40 | ||
5 | 70 | ||
6 | -66 | ||
7 | 9 | ||
8 | 1 | ||
9 | 44000 | ||