aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-11-06 21:05:05 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2015-11-06 21:05:05 +0200
commit7bfc04ecdb80a80faad92a03053015d167a89129 (patch)
tree5382221e775af18754d35cd0ba648a85fb52fb85 /test cases
parent1b697f04cdb54730d1b488e0bbbf5d51d7c41ed7 (diff)
parent63e803ae0f791c1c106d3616790eb9b32e1720b3 (diff)
downloadmeson-7bfc04ecdb80a80faad92a03053015d167a89129.zip
meson-7bfc04ecdb80a80faad92a03053015d167a89129.tar.gz
meson-7bfc04ecdb80a80faad92a03053015d167a89129.tar.bz2
Merged default library branch.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/96 default library/ef.cpp8
-rw-r--r--test cases/common/96 default library/ef.h11
-rw-r--r--test cases/common/96 default library/eftest.cpp14
-rw-r--r--test cases/common/96 default library/meson.build5
4 files changed, 38 insertions, 0 deletions
diff --git a/test cases/common/96 default library/ef.cpp b/test cases/common/96 default library/ef.cpp
new file mode 100644
index 0000000..79983c6
--- /dev/null
+++ b/test cases/common/96 default library/ef.cpp
@@ -0,0 +1,8 @@
+#include"ef.h"
+
+Ef::Ef() : x(99) {
+}
+
+int Ef::get_x() const {
+ return x;
+}
diff --git a/test cases/common/96 default library/ef.h b/test cases/common/96 default library/ef.h
new file mode 100644
index 0000000..cae5c13
--- /dev/null
+++ b/test cases/common/96 default library/ef.h
@@ -0,0 +1,11 @@
+#pragma once
+
+class Ef {
+private:
+ int x;
+
+public:
+
+ Ef();
+ int get_x() const;
+};
diff --git a/test cases/common/96 default library/eftest.cpp b/test cases/common/96 default library/eftest.cpp
new file mode 100644
index 0000000..4d4412d
--- /dev/null
+++ b/test cases/common/96 default library/eftest.cpp
@@ -0,0 +1,14 @@
+#include"ef.h"
+
+#include<iostream>
+
+int main(int, char **) {
+ Ef var;
+ if(var.get_x() == 99) {
+ std::cout << "All is fine.\n";
+ return 0;
+ } else {
+ std::cout << "Something went wrong.\n";
+ return 1;
+ }
+}
diff --git a/test cases/common/96 default library/meson.build b/test cases/common/96 default library/meson.build
new file mode 100644
index 0000000..903cfe4
--- /dev/null
+++ b/test cases/common/96 default library/meson.build
@@ -0,0 +1,5 @@
+project('default library', 'cpp')
+
+flib = library('ef', 'ef.cpp')
+exe = executable('eftest', 'eftest.cpp', link_with : flib)
+test('eftest', exe)