From 7922bd0454bc19cc974de7e2f5cf5ef614569782 Mon Sep 17 00:00:00 2001 From: David Thomas Date: Thu, 9 Mar 2017 10:01:27 +0000 Subject: Transfer in test and documentation parts. --- testing/ref_compiler.sh | 3 +++ testing/testcases/test_ADD.c | 4 ++++ testing/testcases/test_ADD_driver.c | 8 ++++++++ 3 files changed, 15 insertions(+) create mode 100644 testing/ref_compiler.sh create mode 100644 testing/testcases/test_ADD.c create mode 100644 testing/testcases/test_ADD_driver.c (limited to 'testing') 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; +} -- cgit