diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:38 +0000 |
commit | 7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch) | |
tree | 4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/common/131 override options | |
parent | Initial commit. (diff) | |
download | meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip |
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/common/131 override options')
-rw-r--r-- | test cases/common/131 override options/four.c | 9 | ||||
-rw-r--r-- | test cases/common/131 override options/meson.build | 6 | ||||
-rw-r--r-- | test cases/common/131 override options/one.c | 3 | ||||
-rw-r--r-- | test cases/common/131 override options/three.c | 7 | ||||
-rw-r--r-- | test cases/common/131 override options/two.c | 6 |
5 files changed, 31 insertions, 0 deletions
diff --git a/test cases/common/131 override options/four.c b/test cases/common/131 override options/four.c new file mode 100644 index 0000000..44e344f --- /dev/null +++ b/test cases/common/131 override options/four.c @@ -0,0 +1,9 @@ +int func(void); + +static int duplicate_func(void) { + return -4; +} + +int main(void) { + return duplicate_func() + func(); +} diff --git a/test cases/common/131 override options/meson.build b/test cases/common/131 override options/meson.build new file mode 100644 index 0000000..4dd8d79 --- /dev/null +++ b/test cases/common/131 override options/meson.build @@ -0,0 +1,6 @@ +project('option override', 'c', + default_options : 'unity=on') + +executable('mustunity', 'one.c', 'two.c') +executable('notunity', 'three.c', 'four.c', + override_options : ['unity=off']) diff --git a/test cases/common/131 override options/one.c b/test cases/common/131 override options/one.c new file mode 100644 index 0000000..6120d48 --- /dev/null +++ b/test cases/common/131 override options/one.c @@ -0,0 +1,3 @@ +static int hidden_func(void) { + return 0; +} diff --git a/test cases/common/131 override options/three.c b/test cases/common/131 override options/three.c new file mode 100644 index 0000000..094260e --- /dev/null +++ b/test cases/common/131 override options/three.c @@ -0,0 +1,7 @@ +static int duplicate_func(void) { + return 4; +} + +int func(void) { + return duplicate_func(); +} diff --git a/test cases/common/131 override options/two.c b/test cases/common/131 override options/two.c new file mode 100644 index 0000000..0f8048c --- /dev/null +++ b/test cases/common/131 override options/two.c @@ -0,0 +1,6 @@ +/* + * Requires a Unity build. Otherwise hidden_func is not specified. + */ +int main(void) { + return hidden_func(); +} |