diff options
author | David Thomas <m8pple@github.com> | 2017-03-09 10:01:27 +0000 |
---|---|---|
committer | David Thomas <m8pple@github.com> | 2017-03-09 10:01:27 +0000 |
commit | 7922bd0454bc19cc974de7e2f5cf5ef614569782 (patch) | |
tree | 9eb38fa047a57a9c545e40ded9c51f4dae901367 /testing | |
parent | 6baea6b1eeb184ca49f3d2e1961ffd2e43ba8ef4 (diff) | |
download | Compiler-7922bd0454bc19cc974de7e2f5cf5ef614569782.tar.gz Compiler-7922bd0454bc19cc974de7e2f5cf5ef614569782.zip |
Transfer in test and documentation parts.
Diffstat (limited to 'testing')
-rw-r--r-- | testing/ref_compiler.sh | 3 | ||||
-rw-r--r-- | testing/testcases/test_ADD.c | 4 | ||||
-rw-r--r-- | testing/testcases/test_ADD_driver.c | 8 |
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;
+}
|