diff options
8 files changed, 51 insertions, 0 deletions
diff --git a/test cases/common/128 extract all shared library/extractor.h b/test cases/common/128 extract all shared library/extractor.h new file mode 100644 index 0000000..d0917a1 --- /dev/null +++ b/test cases/common/128 extract all shared library/extractor.h @@ -0,0 +1,6 @@ +#pragma once + +int func1(); +int func2(); +int func3(); +int func4(); diff --git a/test cases/common/128 extract all shared library/four.c b/test cases/common/128 extract all shared library/four.c new file mode 100644 index 0000000..5ca6696 --- /dev/null +++ b/test cases/common/128 extract all shared library/four.c @@ -0,0 +1,5 @@ +#include"extractor.h" + +int func4() { + return 4; +} diff --git a/test cases/common/128 extract all shared library/func1234.def b/test cases/common/128 extract all shared library/func1234.def new file mode 100644 index 0000000..d62c08d --- /dev/null +++ b/test cases/common/128 extract all shared library/func1234.def @@ -0,0 +1,5 @@ +EXPORTS + func1 + func2 + func3 + func4 diff --git a/test cases/common/128 extract all shared library/meson.build b/test cases/common/128 extract all shared library/meson.build new file mode 100644 index 0000000..7c24fde --- /dev/null +++ b/test cases/common/128 extract all shared library/meson.build @@ -0,0 +1,10 @@ +project('extract all', 'c', 'cpp') + +a = static_library('a', 'one.c', 'two.c') +b = static_library('b', 'three.c', 'four.c') +c = shared_library('c', + objects : [a.extract_all_objects(), b.extract_all_objects()], + vs_module_defs : 'func1234.def') + +e = executable('proggie', 'prog.c', link_with : c) +test('extall', e) diff --git a/test cases/common/128 extract all shared library/one.c b/test cases/common/128 extract all shared library/one.c new file mode 100644 index 0000000..cfb0157 --- /dev/null +++ b/test cases/common/128 extract all shared library/one.c @@ -0,0 +1,5 @@ +#include"extractor.h" + +int func1() { + return 1; +} diff --git a/test cases/common/128 extract all shared library/prog.c b/test cases/common/128 extract all shared library/prog.c new file mode 100644 index 0000000..57a4c64 --- /dev/null +++ b/test cases/common/128 extract all shared library/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/128 extract all shared library/three.c b/test cases/common/128 extract all shared library/three.c new file mode 100644 index 0000000..c410046 --- /dev/null +++ b/test cases/common/128 extract all shared library/three.c @@ -0,0 +1,5 @@ +#include"extractor.h" + +int func3() { + return 3; +} diff --git a/test cases/common/128 extract all shared library/two.c b/test cases/common/128 extract all shared library/two.c new file mode 100644 index 0000000..3ece512 --- /dev/null +++ b/test cases/common/128 extract all shared library/two.c @@ -0,0 +1,5 @@ +#include"extractor.h" + +int func2() { + return 2; +} |