From ad804a6af1fa8fa19ade230d664a8aa3e3d4e0d2 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 11 Jul 2021 22:05:57 +0400 Subject: Added tests in makefile --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..93f1a43 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +test: test1 test2 test3 +test1: + @echo "=== TEST 1 ===" + @printf "Expression is: %s\n" "(3 + 3 * 2) * 4 + 6 - 9 + -2 * (4 + 8 * 3) = -23" + @printf "Answer is: " + @python3 tokenizer.py "(3 + 3 * 2) * 4 + 6 - 9 + -2 * (4 + 8 * 3)" +test2: + @echo "=== TEST 2 ===" + @printf "Expression is: %s\n" "3 + 3 * 2 + 6 - 9 + -2 * 4 + 8 * 3 = 22" + @printf "Answer is: " + @python3 tokenizer.py "3 + 3 * 2 + 6 - 9 + -2 * 4 + 8 * 3" +test3: + @echo "=== TEST 3 ===" + @printf "Expression is: %s\n" "(2 + (3 * 5)) * 4 - 1 + 3 * (2 + 5 * (7 - 9 + (2 * 4 - 5 * (21 + 52)))) = -5312" + @printf "Answer is: " + @python3 tokenizer.py "(2 + (3 * 5)) * 4 - 1 + 3 * (2 + 5 * (7 - 9 + (2 * 4 - 5 * (21 + 52))))" + -- cgit v1.2.3