diff options
-rw-r--r-- | test cases/7 mixed/builder.txt | 3 | ||||
-rw-r--r-- | test cases/7 mixed/func.c | 4 | ||||
-rw-r--r-- | test cases/7 mixed/main.cc | 5 |
3 files changed, 12 insertions, 0 deletions
diff --git a/test cases/7 mixed/builder.txt b/test cases/7 mixed/builder.txt new file mode 100644 index 0000000..15ec234 --- /dev/null +++ b/test cases/7 mixed/builder.txt @@ -0,0 +1,3 @@ +project('mixed C and C++', 'c', 'c++') +exe = executable('prog', 'main.cc', 'func.c') +add_test('mixtest', exe) diff --git a/test cases/7 mixed/func.c b/test cases/7 mixed/func.c new file mode 100644 index 0000000..9019a81 --- /dev/null +++ b/test cases/7 mixed/func.c @@ -0,0 +1,4 @@ +int func() { + int class = 0; + return class; +} diff --git a/test cases/7 mixed/main.cc b/test cases/7 mixed/main.cc new file mode 100644 index 0000000..e2794d5 --- /dev/null +++ b/test cases/7 mixed/main.cc @@ -0,0 +1,5 @@ +extern "C" int func(); + +int main(int argc, char **argv) { + return func(); +} |