diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/common/81 extract all | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/common/81 extract all')
-rw-r--r-- | meson/test cases/common/81 extract all/extractor.h | 6 | ||||
-rw-r--r-- | meson/test cases/common/81 extract all/four.c | 5 | ||||
-rw-r--r-- | meson/test cases/common/81 extract all/meson.build | 13 | ||||
-rw-r--r-- | meson/test cases/common/81 extract all/one.c | 5 | ||||
-rw-r--r-- | meson/test cases/common/81 extract all/prog.c | 10 | ||||
-rw-r--r-- | meson/test cases/common/81 extract all/three.c | 5 | ||||
-rw-r--r-- | meson/test cases/common/81 extract all/two.c | 5 |
7 files changed, 49 insertions, 0 deletions
diff --git a/meson/test cases/common/81 extract all/extractor.h b/meson/test cases/common/81 extract all/extractor.h new file mode 100644 index 000000000..cfb7ff6d6 --- /dev/null +++ b/meson/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/meson/test cases/common/81 extract all/four.c b/meson/test cases/common/81 extract all/four.c new file mode 100644 index 000000000..f67a85e68 --- /dev/null +++ b/meson/test cases/common/81 extract all/four.c @@ -0,0 +1,5 @@ +#include"extractor.h" + +int func4(void) { + return 4; +} diff --git a/meson/test cases/common/81 extract all/meson.build b/meson/test cases/common/81 extract all/meson.build new file mode 100644 index 000000000..4f08a4fa6 --- /dev/null +++ b/meson/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/meson/test cases/common/81 extract all/one.c b/meson/test cases/common/81 extract all/one.c new file mode 100644 index 000000000..152a1455d --- /dev/null +++ b/meson/test cases/common/81 extract all/one.c @@ -0,0 +1,5 @@ +#include"extractor.h" + +int func1(void) { + return 1; +} diff --git a/meson/test cases/common/81 extract all/prog.c b/meson/test cases/common/81 extract all/prog.c new file mode 100644 index 000000000..de0cc7f8e --- /dev/null +++ b/meson/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/meson/test cases/common/81 extract all/three.c b/meson/test cases/common/81 extract all/three.c new file mode 100644 index 000000000..24604ed72 --- /dev/null +++ b/meson/test cases/common/81 extract all/three.c @@ -0,0 +1,5 @@ +#include"extractor.h" + +int func3(void) { + return 3; +} diff --git a/meson/test cases/common/81 extract all/two.c b/meson/test cases/common/81 extract all/two.c new file mode 100644 index 000000000..800cd2dfb --- /dev/null +++ b/meson/test cases/common/81 extract all/two.c @@ -0,0 +1,5 @@ +#include"extractor.h" + +int func2(void) { + return 2; +} |