diff options
author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2018-12-08 00:00:00 +0000 |
---|---|---|
committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2018-12-08 23:14:02 +0100 |
commit | 85e29abff63c00021674f33d5cae84873cd06c95 (patch) | |
tree | 5ce9974c16bb3bc956ff949cd1392b0da24a9096 /tests | |
parent | b18e5fc4c290642e95a2ea296c1b843facf47067 (diff) | |
download | gobject-introspection-85e29abff63c00021674f33d5cae84873cd06c95.tar.gz |
Ignore __pragma keyword used by MSVC
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scanner/test_sourcescanner.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/scanner/test_sourcescanner.py b/tests/scanner/test_sourcescanner.py index ecd312e3..2f383af7 100644 --- a/tests/scanner/test_sourcescanner.py +++ b/tests/scanner/test_sourcescanner.py @@ -46,6 +46,19 @@ void foo() { self.assertEqual(len(errors), 1) self.assertTrue("syntax error" in errors[0]) + def test_ignore_pragma(self): + """Pragma directive and __pragma keyword are ignored""" + scanner = self._parse_files(""" +#pragma warning(push) +void test(void) { + __pragma(warning(push)) + __pragma(warning(disable:6246)) + __pragma(warning(pop)) +} +#pragma warning(pop) +""") + self.assertFalse(scanner.get_errors()) + def test_ignore_typeof(self): # https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/71 scanner = self._parse_files(""" |