summaryrefslogtreecommitdiffstats
path: root/test cases/common/81 extract all
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
commit7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch)
tree4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/common/81 extract all
parentInitial commit. (diff)
downloadmeson-upstream.tar.xz
meson-upstream.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--test cases/common/81 extract all/extractor.h6
-rw-r--r--test cases/common/81 extract all/four.c5
-rw-r--r--test cases/common/81 extract all/meson.build13
-rw-r--r--test cases/common/81 extract all/one.c5
-rw-r--r--test cases/common/81 extract all/prog.c10
-rw-r--r--test cases/common/81 extract all/three.c5
-rw-r--r--test cases/common/81 extract all/two.c5
7 files changed, 49 insertions, 0 deletions
diff --git a/test cases/common/81 extract all/extractor.h b/test cases/common/81 extract all/extractor.h
new file mode 100644
index 0000000..cfb7ff6
--- /dev/null
+++ b/test cases/common/81 extract all/extractor.h
@@ -0,0 +1,6 @@
+#pragma once
+
+int func1(void);
+int func2(void);
+int func3(void);
+int func4(void);
diff --git a/test cases/common/81 extract all/four.c b/test cases/common/81 extract all/four.c
new file mode 100644
index 0000000..f67a85e
--- /dev/null
+++ b/test cases/common/81 extract all/four.c
@@ -0,0 +1,5 @@
+#include"extractor.h"
+
+int func4(void) {
+ return 4;
+}
diff --git a/test cases/common/81 extract all/meson.build b/test cases/common/81 extract all/meson.build
new file mode 100644
index 0000000..4f08a4f
--- /dev/null
+++ b/test cases/common/81 extract all/meson.build
@@ -0,0 +1,13 @@
+project('extract all', 'c')
+
+a = static_library('a', 'one.c', 'two.c')
+b = static_library('b', 'three.c', 'four.c')
+c = static_library('c', objects : [a.extract_all_objects(), b.extract_all_objects()])
+d = static_library('d', objects : [a.extract_all_objects(), b.extract_all_objects(), c.extract_all_objects()])
+d_recursive = static_library('d_recursive', objects : [c.extract_all_objects(recursive : true)])
+
+e = executable('proggie', 'prog.c', link_with : d)
+test('extall', e)
+
+e = executable('proggie_recursive', 'prog.c', link_with : d_recursive)
+test('extall_recursive', e)
diff --git a/test cases/common/81 extract all/one.c b/test cases/common/81 extract all/one.c
new file mode 100644
index 0000000..152a145
--- /dev/null
+++ b/test cases/common/81 extract all/one.c
@@ -0,0 +1,5 @@
+#include"extractor.h"
+
+int func1(void) {
+ return 1;
+}
diff --git a/test cases/common/81 extract all/prog.c b/test cases/common/81 extract all/prog.c
new file mode 100644
index 0000000..de0cc7f
--- /dev/null
+++ b/test cases/common/81 extract all/prog.c
@@ -0,0 +1,10 @@
+#include"extractor.h"
+#include<stdio.h>
+
+int main(void) {
+ if((1+2+3+4) != (func1() + func2() + func3() + func4())) {
+ printf("Arithmetic is fail.\n");
+ return 1;
+ }
+ return 0;
+}
diff --git a/test cases/common/81 extract all/three.c b/test cases/common/81 extract all/three.c
new file mode 100644
index 0000000..24604ed
--- /dev/null
+++ b/test cases/common/81 extract all/three.c
@@ -0,0 +1,5 @@
+#include"extractor.h"
+
+int func3(void) {
+ return 3;
+}
diff --git a/test cases/common/81 extract all/two.c b/test cases/common/81 extract all/two.c
new file mode 100644
index 0000000..800cd2d
--- /dev/null
+++ b/test cases/common/81 extract all/two.c
@@ -0,0 +1,5 @@
+#include"extractor.h"
+
+int func2(void) {
+ return 2;
+}