summaryrefslogtreecommitdiff
path: root/tests/scanner/regress.h
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2020-02-06 18:26:35 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2020-02-06 18:26:35 +0800
commit82e55f5fa2f70ff3ba7a953fa3430eb922617e7a (patch)
tree3ea692c44e3908bc21026c254b9643cc76d0b257 /tests/scanner/regress.h
parent699758dae5ab68285d7125aeb728901aa13ef27e (diff)
downloadgobject-introspection-82e55f5fa2f70ff3ba7a953fa3430eb922617e7a.tar.gz
Fix regress scanner tests
There is no way that non-GCC/CLang compilers will pass this test because the source position will never match the position that is in tests/scanner/Regress-1.0-expected.gir. Fix this the fast way: define a macro according to the compiler check and update the corresponding source position
Diffstat (limited to 'tests/scanner/regress.h')
-rw-r--r--tests/scanner/regress.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h
index d1c7b437..0b239f14 100644
--- a/tests/scanner/regress.h
+++ b/tests/scanner/regress.h
@@ -868,12 +868,12 @@ _GI_TEST_EXTERN
void regress_test_array_fixed_out_objects (RegressTestObj ***objs);
#if (defined(__GNUC__) || defined(__clang__)) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-_GI_TEST_EXTERN
-void regress_test_array_static_in_int (int x[static 10]);
+# define G_GCC_STATIC static
#else
-_GI_TEST_EXTERN
-void regress_test_array_static_in_int (int x[10]);
+# define G_GCC_STATIC
#endif
+_GI_TEST_EXTERN
+void regress_test_array_static_in_int (int x[G_GCC_STATIC 10]);
_GI_TEST_EXTERN
void regress_test_obj_torture_signature_0 (RegressTestObj *obj,