Added integration test to ensure that order of operations is correct
authorDavid Kerkeslager <kerkeslager@gmail.com>
Fri, 4 Aug 2017 23:12:43 +0000 (19:12 -0400)
committerDavid Kerkeslager <kerkeslager@gmail.com>
Fri, 4 Aug 2017 23:12:43 +0000 (19:12 -0400)
examples/05_order_of_operations.fur [new file with mode: 0644]
examples/05_order_of_operations.fur.output.txt [new file with mode: 0644]

diff --git a/examples/05_order_of_operations.fur b/examples/05_order_of_operations.fur
new file mode 100644 (file)
index 0000000..c845db5
--- /dev/null
@@ -0,0 +1,11 @@
+print(1 + 2 * 3)
+print('\n')
+print(4 + 2 // 3)
+print('\n')
+print(1 + 2 % 3)
+print('\n')
+print(1 - 2 * 3)
+print('\n')
+print(4 - 2 // 3)
+print('\n')
+print(5 - 2 % 3)
diff --git a/examples/05_order_of_operations.fur.output.txt b/examples/05_order_of_operations.fur.output.txt
new file mode 100644 (file)
index 0000000..d9ae1ce
--- /dev/null
@@ -0,0 +1,6 @@
+7
+4
+3
+-5
+4
+3
\ No newline at end of file