diff options
| author | ruki <[email protected]> | 2021-06-02 22:54:27 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-06-02 22:54:27 +0800 |
| commit | 8dda67ba52ed67cc3e6897849658872c2ef4ddcc (patch) | |
| tree | a6f1b6681af1d2958409e117acc39edaa6ea4e6a /tests/actions/package/localpkg/libfoo/src | |
| parent | 16919177c72aa5934113d37932e0b60c8d4a52df (diff) | |
add deps for localpackages
Diffstat (limited to 'tests/actions/package/localpkg/libfoo/src')
| -rw-r--r-- | tests/actions/package/localpkg/libfoo/src/add.cpp (renamed from tests/actions/package/localpkg/libfoo/src/interface.cpp) | 2 | ||||
| -rw-r--r-- | tests/actions/package/localpkg/libfoo/src/add.h (renamed from tests/actions/package/localpkg/libfoo/src/interface.h) | 0 | ||||
| -rw-r--r-- | tests/actions/package/localpkg/libfoo/src/foo.cpp | 8 | ||||
| -rw-r--r-- | tests/actions/package/localpkg/libfoo/src/foo.h | 16 | ||||
| -rw-r--r-- | tests/actions/package/localpkg/libfoo/src/sub.cpp | 6 | ||||
| -rw-r--r-- | tests/actions/package/localpkg/libfoo/src/sub.h | 16 |
6 files changed, 47 insertions, 1 deletions
diff --git a/tests/actions/package/localpkg/libfoo/src/interface.cpp b/tests/actions/package/localpkg/libfoo/src/add.cpp index 598d07560..e73473e0f 100644 --- a/tests/actions/package/localpkg/libfoo/src/interface.cpp +++ b/tests/actions/package/localpkg/libfoo/src/add.cpp @@ -1,4 +1,4 @@ -#include "interface.h" +#include "add.h" int add(int a, int b) { diff --git a/tests/actions/package/localpkg/libfoo/src/interface.h b/tests/actions/package/localpkg/libfoo/src/add.h index 62a39427c..62a39427c 100644 --- a/tests/actions/package/localpkg/libfoo/src/interface.h +++ b/tests/actions/package/localpkg/libfoo/src/add.h diff --git a/tests/actions/package/localpkg/libfoo/src/foo.cpp b/tests/actions/package/localpkg/libfoo/src/foo.cpp new file mode 100644 index 000000000..b13e8e761 --- /dev/null +++ b/tests/actions/package/localpkg/libfoo/src/foo.cpp @@ -0,0 +1,8 @@ +#include "add.h" +#include "sub.h" +#include "foo.h" + +int foo(int a, int b) +{ + return add(sub(a, b), sub(b, a)); +} diff --git a/tests/actions/package/localpkg/libfoo/src/foo.h b/tests/actions/package/localpkg/libfoo/src/foo.h new file mode 100644 index 000000000..d53be3150 --- /dev/null +++ b/tests/actions/package/localpkg/libfoo/src/foo.h @@ -0,0 +1,16 @@ +#ifdef __cplusplus +extern "C" { +#endif + +/*! calculate foo(a, b) + * + * @param a the first argument + * @param b the second argument + * + * @return the result + */ +int foo(int a, int b); + +#ifdef __cplusplus +} +#endif diff --git a/tests/actions/package/localpkg/libfoo/src/sub.cpp b/tests/actions/package/localpkg/libfoo/src/sub.cpp new file mode 100644 index 000000000..a65acd40f --- /dev/null +++ b/tests/actions/package/localpkg/libfoo/src/sub.cpp @@ -0,0 +1,6 @@ +#include "sub.h" + +int sub(int a, int b) +{ + return a - b; +} diff --git a/tests/actions/package/localpkg/libfoo/src/sub.h b/tests/actions/package/localpkg/libfoo/src/sub.h new file mode 100644 index 000000000..1bda92bc5 --- /dev/null +++ b/tests/actions/package/localpkg/libfoo/src/sub.h @@ -0,0 +1,16 @@ +#ifdef __cplusplus +extern "C" { +#endif + +/*! calculate sub(a, b) + * + * @param a the first argument + * @param b the second argument + * + * @return the result + */ +int sub(int a, int b); + +#ifdef __cplusplus +} +#endif |
