diff options
author | Eli Bendersky <eliben@gmail.com> | 2018-06-15 05:36:02 -0700 |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2018-06-15 05:36:02 -0700 |
commit | cecb63890ca13253060540832d94b640b70a7c47 (patch) | |
tree | 1a50ff95741176611f19ec02e69547438949b068 | |
parent | 2d717d42659135c8371b3bfa7fd5b04c5cdc41c3 (diff) | |
download | pycparser-cecb63890ca13253060540832d94b640b70a7c47.tar.gz |
Add test for "const volatile int*" parsing
-rwxr-xr-x | tests/test_c_parser.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_c_parser.py b/tests/test_c_parser.py index 9dfb132..fd85c0d 100755 --- a/tests/test_c_parser.py +++ b/tests/test_c_parser.py @@ -393,6 +393,14 @@ class TestCParser_fundamentals(TestCParser_base): ['TypeDecl', ['IdentifierType', ['int']]]]], ['TypeDecl', ['IdentifierType', ['int']]]]]]) + self.assertEqual(self.get_decl('int (*k)(const volatile int* q);'), + ['Decl', 'k', + ['PtrDecl', + ['FuncDecl', + [['Decl', ['const', 'volatile'], 'q', + ['PtrDecl', ['TypeDecl', ['IdentifierType', ['int']]]]]], + ['TypeDecl', ['IdentifierType', ['int']]]]]]) + # restrict qualifier self.assertEqual(self.get_decl('int (*k)(restrict int* q);'), ['Decl', 'k', |