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/frameworks/29 blocks | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/frameworks/29 blocks')
-rw-r--r-- | meson/test cases/frameworks/29 blocks/main.c | 6 | ||||
-rw-r--r-- | meson/test cases/frameworks/29 blocks/meson.build | 12 | ||||
-rw-r--r-- | meson/test cases/frameworks/29 blocks/test.json | 3 |
3 files changed, 21 insertions, 0 deletions
diff --git a/meson/test cases/frameworks/29 blocks/main.c b/meson/test cases/frameworks/29 blocks/main.c new file mode 100644 index 000000000..e5ae5894a --- /dev/null +++ b/meson/test cases/frameworks/29 blocks/main.c @@ -0,0 +1,6 @@ +int main(int argc, char **argv) +{ + int (^callback)(void) = ^ int (void) { return 0; }; + + return callback(); +} diff --git a/meson/test cases/frameworks/29 blocks/meson.build b/meson/test cases/frameworks/29 blocks/meson.build new file mode 100644 index 000000000..398c92c2b --- /dev/null +++ b/meson/test cases/frameworks/29 blocks/meson.build @@ -0,0 +1,12 @@ +project('blocks-dependency', 'c') + +id = meson.get_compiler('c').get_id() +if id != 'clang' or build_machine.system() == 'windows' + error('MESON_SKIP_TEST: Only clang on unix-like systems supports the blocks extension.') +endif + +exe = executable('main', 'main.c', + dependencies: dependency('blocks') +) + +test('test-blocks', exe) diff --git a/meson/test cases/frameworks/29 blocks/test.json b/meson/test cases/frameworks/29 blocks/test.json new file mode 100644 index 000000000..b21e77b8e --- /dev/null +++ b/meson/test cases/frameworks/29 blocks/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["gcc"] +} |