diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/warn/Makefile.am | 1 | ||||
-rw-r--r-- | tests/warn/invalid-array.h | 44 |
2 files changed, 45 insertions, 0 deletions
diff --git a/tests/warn/Makefile.am b/tests/warn/Makefile.am index 26c2dcbb..db006e57 100644 --- a/tests/warn/Makefile.am +++ b/tests/warn/Makefile.am @@ -4,6 +4,7 @@ TESTS = \ callback-invalid-scope.h \ callback-missing-scope.h \ return-gobject.h \ + invalid-array.h \ invalid-element-type.h \ invalid-option.h \ invalid-out.h \ diff --git a/tests/warn/invalid-array.h b/tests/warn/invalid-array.h new file mode 100644 index 00000000..a4a4e47e --- /dev/null +++ b/tests/warn/invalid-array.h @@ -0,0 +1,44 @@ +#include "common.h" + +/** + * test_invalid_array: + * @out1: (array foobar): + **/ +void +test_invalid_array (char ***out1); + +// EXPECT:5: Warning: Test: invalid array annotation value: 'foobar' + +/** + * test_invalid_array_zero_terminated: + * @out1: (array zero-terminated): + * @out2: (array zero-terminated=foobar): + **/ +void +test_invalid_array_zero_terminated (char ***out1, + char ***out2); + +// EXPECT:14: Warning: Test: array option zero-terminated needs a value +// EXPECT:15: Warning: Test: invalid array zero-terminated option value 'foobar', must be an integer + +/** + * test_invalid_array_fixed_size: + * @out1: (array fixed-size): + * @out2: (array fixed-size=foobar): + **/ +void +test_invalid_array_fixed_size (char ***out1, + char ***out2); + +// EXPECT:26: Warning: Test: array option fixed-size needs a value +// EXPECT:27: Warning: Test: invalid array fixed-size option value 'foobar', must be an integer + +/** + * test_invalid_array_length: + * @out1: (array length): + **/ +void +test_invalid_array_length (char ***out1, + char ***out2); + +// EXPECT:38: Warning: Test: array option length needs a value |