summaryrefslogtreecommitdiff
path: root/tests
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
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')
-rw-r--r--tests/scanner/Regress-1.0-expected.gir2
-rw-r--r--tests/scanner/regress.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index 872a2a3b..cef3b124 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -6818,7 +6818,7 @@ libgnome-keyring.</doc>
</function>
<function name="test_array_static_in_int"
c:identifier="regress_test_array_static_in_int">
- <source-position filename="regress.h" line="872"/>
+ <source-position filename="regress.h" line="876"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
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,