From 273cdbcbf8da101511a57be13118a8efbdbc3a0f Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 30 May 2018 20:45:55 -0400 Subject: [PATCH] add test 3 --- tests/t003.cxl | 19 +++++++++++++++++++ tests/t003.x | 1 + 2 files changed, 20 insertions(+) create mode 100644 tests/t003.cxl create mode 100644 tests/t003.x diff --git a/tests/t003.cxl b/tests/t003.cxl new file mode 100644 index 0000000..16355b6 --- /dev/null +++ b/tests/t003.cxl @@ -0,0 +1,19 @@ +#include + +int sum(int * arr) +{ + int s; + for (s = 0; *arr != 0; arr++) + { + s += *arr; + } + return s; +} + +int main(int argc, char * argv[]) +{ + int a[] = {5, 6, 7, 0}; + int b[] = {10, 20, -500, 0}; + printf("%d;%d\n", sum(a), sum(b)); + return 0; +} diff --git a/tests/t003.x b/tests/t003.x new file mode 100644 index 0000000..dd58918 --- /dev/null +++ b/tests/t003.x @@ -0,0 +1 @@ +18;-470