summaryrefslogtreecommitdiffstats
path: root/test cases/native/6 add language
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/native/6 add language')
-rw-r--r--test cases/native/6 add language/meson.build3
-rw-r--r--test cases/native/6 add language/prog.cc6
2 files changed, 9 insertions, 0 deletions
diff --git a/test cases/native/6 add language/meson.build b/test cases/native/6 add language/meson.build
new file mode 100644
index 0000000..a7aad73
--- /dev/null
+++ b/test cases/native/6 add language/meson.build
@@ -0,0 +1,3 @@
+project('add language', 'c')
+assert(add_languages('cpp', native: true), 'Add_languages returned false on success')
+test('C++', executable('cppprog', 'prog.cc', native: true))
diff --git a/test cases/native/6 add language/prog.cc b/test cases/native/6 add language/prog.cc
new file mode 100644
index 0000000..03647dd
--- /dev/null
+++ b/test cases/native/6 add language/prog.cc
@@ -0,0 +1,6 @@
+#include<iostream>
+
+int main(int, char**) {
+ std::cout << "I am C++.\n";
+ return 0;
+}