Skip to content

Commit 26dc348

Browse files
committed
Add a test to verify that the header are indeed c99
The goal is to catch issue like this one: FFMS#472 (comment)
1 parent d0d6eca commit 26dc348

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

test/meson.build

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,15 @@ display_matrix = executable(
4444
],
4545
)
4646
test('display_matrix', display_matrix)
47+
48+
49+
# Test that the header are indeed compatible with c99
50+
add_languages('c', native : false)
51+
c_compiler = meson.get_compiler('c')
52+
c99_header = executable(
53+
'c99_header',
54+
files('test.c'),
55+
dependencies : ffms2_dep,
56+
override_options : {'c_std' : 'c99', 'werror' : true, 'warning_level' : '3'},
57+
)
58+
test('c99_header', c99_header)

test/test.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Include all ffms2 headers
2+
#include <ffms.h>
3+
#include <ffmscompat.h>
4+
5+
int main(void) {
6+
return 0;
7+
}

0 commit comments

Comments
 (0)