aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/ref_compiler.sh3
-rw-r--r--testing/testcases/test_ADD.c4
-rw-r--r--testing/testcases/test_ADD_driver.c8
3 files changed, 15 insertions, 0 deletions
diff --git a/testing/ref_compiler.sh b/testing/ref_compiler.sh
new file mode 100644
index 0000000..b5425b0
--- /dev/null
+++ b/testing/ref_compiler.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+mips-linux-gnu-gcc -c -S -x c - -o -
diff --git a/testing/testcases/test_ADD.c b/testing/testcases/test_ADD.c
new file mode 100644
index 0000000..327dc85
--- /dev/null
+++ b/testing/testcases/test_ADD.c
@@ -0,0 +1,4 @@
+int f(int a, int b)
+{
+ return 1;
+}
diff --git a/testing/testcases/test_ADD_driver.c b/testing/testcases/test_ADD_driver.c
new file mode 100644
index 0000000..9e74f32
--- /dev/null
+++ b/testing/testcases/test_ADD_driver.c
@@ -0,0 +1,8 @@
+int f(int a, int b);
+
+int main()
+{
+ int r=f(10,11);
+
+ return r == 21;
+}