aboutsummaryrefslogtreecommitdiffstats
path: root/test_deliverable
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-03-25 00:22:10 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-03-25 00:22:10 +0000
commitf8d552b35e4897b18cc01777bb9725c59a3d5340 (patch)
tree73f5ca42d86cce43c152129f772043553d959974 /test_deliverable
parente027bef26e25af8e3998d06942872bdcb36ee551 (diff)
downloadCompiler-f8d552b35e4897b18cc01777bb9725c59a3d5340.tar.gz
Compiler-f8d552b35e4897b18cc01777bb9725c59a3d5340.zip
Arrays working i think
Diffstat (limited to 'test_deliverable')
-rw-r--r--test_deliverable/testcases/test_ARRAY1.c5
-rw-r--r--test_deliverable/testcases/test_ARRAY1_driver.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/test_deliverable/testcases/test_ARRAY1.c b/test_deliverable/testcases/test_ARRAY1.c
new file mode 100644
index 0000000..347dbdb
--- /dev/null
+++ b/test_deliverable/testcases/test_ARRAY1.c
@@ -0,0 +1,5 @@
+int array1(int a, int b, int c, int d, int e, int f)
+{
+ int x[5] = { a, b, c, d, e, };
+ return x[f];
+}
diff --git a/test_deliverable/testcases/test_ARRAY1_driver.c b/test_deliverable/testcases/test_ARRAY1_driver.c
new file mode 100644
index 0000000..9bcfc41
--- /dev/null
+++ b/test_deliverable/testcases/test_ARRAY1_driver.c
@@ -0,0 +1,6 @@
+int array1(int, int, int, int, int, int);
+
+int main()
+{
+ return !( 2398 == array1(34, 2344, 2398, 12393, 93, 2) );
+}