summaryrefslogtreecommitdiffstats
path: root/test cases/failing/127 extract from unity
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/failing/127 extract from unity')
-rw-r--r--test cases/failing/127 extract from unity/meson.build4
-rw-r--r--test cases/failing/127 extract from unity/src1.c3
-rw-r--r--test cases/failing/127 extract from unity/src2.c3
-rw-r--r--test cases/failing/127 extract from unity/test.json7
4 files changed, 17 insertions, 0 deletions
diff --git a/test cases/failing/127 extract from unity/meson.build b/test cases/failing/127 extract from unity/meson.build
new file mode 100644
index 0000000..9e3e65f
--- /dev/null
+++ b/test cases/failing/127 extract from unity/meson.build
@@ -0,0 +1,4 @@
+project('extract nonexisting gen', 'c')
+
+lib1 = library('lib1', 'src1.c', 'src2.c', override_options: ['unity=on'])
+lib2 = library('lib2', objects: lib1.extract_objects('src1.c'))
diff --git a/test cases/failing/127 extract from unity/src1.c b/test cases/failing/127 extract from unity/src1.c
new file mode 100644
index 0000000..da971bb
--- /dev/null
+++ b/test cases/failing/127 extract from unity/src1.c
@@ -0,0 +1,3 @@
+int sub_lib_method1() {
+ return 1337;
+}
diff --git a/test cases/failing/127 extract from unity/src2.c b/test cases/failing/127 extract from unity/src2.c
new file mode 100644
index 0000000..a461669
--- /dev/null
+++ b/test cases/failing/127 extract from unity/src2.c
@@ -0,0 +1,3 @@
+int sub_lib_method2() {
+ return 1337;
+}
diff --git a/test cases/failing/127 extract from unity/test.json b/test cases/failing/127 extract from unity/test.json
new file mode 100644
index 0000000..e27599d
--- /dev/null
+++ b/test cases/failing/127 extract from unity/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/127 extract from unity/meson.build:4:0: ERROR: Single object files can not be extracted in Unity builds. You can only extract all the object files for each compiler at once."
+ }
+ ]
+}