summaryrefslogtreecommitdiff
path: root/run_tests.sh
diff options
context:
space:
mode:
authorbd-912 <bdunahu@colostate.edu>2024-03-04 22:53:58 -0700
committerbd-912 <bdunahu@colostate.edu>2024-03-04 22:53:58 -0700
commit12f1e24766b061e00663e1934b76f64cd79c8fea (patch)
tree7d7a5343b2a58344770191a954bb2a6e5e05ccc2 /run_tests.sh
parenta23fdfa59b8fa2eaf58fbf6d677caf0b6cdf5a31 (diff)
Minimal test suite---failing tests
Diffstat (limited to 'run_tests.sh')
-rwxr-xr-xrun_tests.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/run_tests.sh b/run_tests.sh
new file mode 100755
index 0000000..4a7c056
--- /dev/null
+++ b/run_tests.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+for i in ./tests/*.java; do
+ [ -f "$i" ] || break
+ [[ "$i" == *"error"* ]] && expected="Type error" ||
+ expected="Program type checked successfully"
+ actual=$(java Typecheck < $i)
+
+ echo -n "$(basename ${i}): "
+ [[ $expected != $actual ]] && echo -e "FAILED---Expected: $expected" || echo 'PASSED'
+done
+
+