[gobject-introspection/fix-tests.msvc] Fix regress scanner tests
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/fix-tests.msvc] Fix regress scanner tests
- Date: Thu, 6 Feb 2020 10:29:27 +0000 (UTC)
commit 82e55f5fa2f70ff3ba7a953fa3430eb922617e7a
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Feb 6 18:26:35 2020 +0800
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
tests/scanner/Regress-1.0-expected.gir | 2 +-
tests/scanner/regress.h | 8 ++++----
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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]