From ec6fd4eeca3fa468cffb25b472eb349c1fed06aa Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 22 Feb 2016 08:49:20 +0800 Subject: modify tests script --- tests/static_library_c/src/interface.c | 6 ++++++ tests/static_library_c/src/interface.h | 8 ++++++++ tests/static_library_c/src/test.c | 8 ++++++++ 3 files changed, 22 insertions(+) create mode 100755 tests/static_library_c/src/interface.c create mode 100755 tests/static_library_c/src/interface.h create mode 100755 tests/static_library_c/src/test.c (limited to 'tests/static_library_c/src') diff --git a/tests/static_library_c/src/interface.c b/tests/static_library_c/src/interface.c new file mode 100755 index 000000000..598d07560 --- /dev/null +++ b/tests/static_library_c/src/interface.c @@ -0,0 +1,6 @@ +#include "interface.h" + +int add(int a, int b) +{ + return a + b; +} diff --git a/tests/static_library_c/src/interface.h b/tests/static_library_c/src/interface.h new file mode 100755 index 000000000..10ec0f856 --- /dev/null +++ b/tests/static_library_c/src/interface.h @@ -0,0 +1,8 @@ +/*! calculate add(a, b) + * + * @param a the first argument + * @param b the second argument + * + * @return the result + */ +int add(int a, int b); diff --git a/tests/static_library_c/src/test.c b/tests/static_library_c/src/test.c new file mode 100755 index 000000000..9505a2f75 --- /dev/null +++ b/tests/static_library_c/src/test.c @@ -0,0 +1,8 @@ +#include "interface.h" +#include + +int main(int argc, char** argv) +{ + printf("add(1, 2) = %d\n", add(1, 2)); + return 0; +} -- cgit v1.3.1