aboutsummaryrefslogtreecommitdiff
path: root/test cases/common
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/common')
-rw-r--r--test cases/common/88 extract all/extractor.h6
-rw-r--r--test cases/common/88 extract all/four.c5
-rw-r--r--test cases/common/88 extract all/meson.build9
-rw-r--r--test cases/common/88 extract all/one.c5
-rw-r--r--test cases/common/88 extract all/prog.c10
-rw-r--r--test cases/common/88 extract all/three.c5
-rw-r--r--test cases/common/88 extract all/two.c5
7 files changed, 45 insertions, 0 deletions
diff --git a/test cases/common/88 extract all/extractor.h b/test cases/common/88 extract all/extractor.h
new file mode 100644
index 0000000..d0917a1
--- /dev/null
+++ b/test cases/common/88 extract all/extractor.h
@@ -0,0 +1,6 @@
+#pragma once
+
+int func1();
+int func2();
+int func3();
+int func4();
diff --git a/test cases/common/88 extract all/four.c b/test cases/common/88 extract all/four.c
new file mode 100644
index 0000000..5ca6696
--- /dev/null
+++ b/test cases/common/88 extract all/four.c
@@ -0,0 +1,5 @@
+#include"extractor.h"
+
+int func4() {
+ return 4;
+}
diff --git a/test cases/common/88 extract all/meson.build b/test cases/common/88 extract all/meson.build
new file mode 100644
index 0000000..91a8d5f
--- /dev/null
+++ b/test cases/common/88 extract all/meson.build
@@ -0,0 +1,9 @@
+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()])
+
+e = executable('proggie', 'prog.c', link_with : c)
+test('extall', e)
diff --git a/test cases/common/88 extract all/one.c b/test cases/common/88 extract all/one.c
new file mode 100644
index 0000000..cfb0157
--- /dev/null
+++ b/test cases/common/88 extract all/one.c
@@ -0,0 +1,5 @@
+#include"extractor.h"
+
+int func1() {
+ return 1;
+}
diff --git a/test cases/common/88 extract all/prog.c b/test cases/common/88 extract all/prog.c
new file mode 100644
index 0000000..57a4c64
--- /dev/null
+++ b/test cases/common/88 extract all/prog.c
@@ -0,0 +1,10 @@
+#include"extractor.h"
+#include<stdio.h>
+
+int main(int argc, char **argv) {
+ if((1+2+3+4) != (func1() + func2() + func3() + func4())) {
+ printf("Arithmetic is fail.\n");
+ return 1;
+ }
+ return 0;
+}
diff --git a/test cases/common/88 extract all/three.c b/test cases/common/88 extract all/three.c
new file mode 100644
index 0000000..c410046
--- /dev/null
+++ b/test cases/common/88 extract all/three.c
@@ -0,0 +1,5 @@
+#include"extractor.h"
+
+int func3() {
+ return 3;
+}
diff --git a/test cases/common/88 extract all/two.c b/test cases/common/88 extract all/two.c
new file mode 100644
index 0000000..3ece512
--- /dev/null
+++ b/test cases/common/88 extract all/two.c
@@ -0,0 +1,5 @@
+#include"extractor.h"
+
+int func2() {
+ return 2;
+}