diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/common/82 add language | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/common/82 add language')
-rw-r--r-- | meson/test cases/common/82 add language/meson.build | 10 | ||||
-rw-r--r-- | meson/test cases/common/82 add language/prog.c | 6 | ||||
-rw-r--r-- | meson/test cases/common/82 add language/prog.cc | 6 |
3 files changed, 22 insertions, 0 deletions
diff --git a/meson/test cases/common/82 add language/meson.build b/meson/test cases/common/82 add language/meson.build new file mode 100644 index 000000000..e99f33a81 --- /dev/null +++ b/meson/test cases/common/82 add language/meson.build @@ -0,0 +1,10 @@ +project('add language', 'c') + +test('C', executable('cprog', 'prog.c')) + +assert(add_languages('cpp', native: false), 'Add_languages returned false on success') +assert(not add_languages('klingon', required : false), 'Add_languages returned true on failure.') + +test('C++', executable('cppprog', 'prog.cc')) + +add_languages('c', native: false) diff --git a/meson/test cases/common/82 add language/prog.c b/meson/test cases/common/82 add language/prog.c new file mode 100644 index 000000000..9d747f00d --- /dev/null +++ b/meson/test cases/common/82 add language/prog.c @@ -0,0 +1,6 @@ +#include<stdio.h> + +int main(void) { + printf("I am plain C.\n"); + return 0; +} diff --git a/meson/test cases/common/82 add language/prog.cc b/meson/test cases/common/82 add language/prog.cc new file mode 100644 index 000000000..03647dde4 --- /dev/null +++ b/meson/test cases/common/82 add language/prog.cc @@ -0,0 +1,6 @@ +#include<iostream> + +int main(int, char**) { + std::cout << "I am C++.\n"; + return 0; +} |