diff options
author | Eli Bendersky <eliben@gmail.com> | 2021-08-28 19:37:37 -0700 |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2021-08-28 19:37:37 -0700 |
commit | 302855a6f30bdec33614a145f1dbe031316f351a (patch) | |
tree | bd511161968db4669c6baa905cc97534e7cc2064 /tests | |
parent | 7d9a6d96af0828892bc296aedbf35bc81482e8ac (diff) | |
download | pycparser-302855a6f30bdec33614a145f1dbe031316f351a.tar.gz |
Add a tricky test, and reformat some comments
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_c_parser.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_c_parser.py b/tests/test_c_parser.py index 11717a5..270f2fb 100755 --- a/tests/test_c_parser.py +++ b/tests/test_c_parser.py @@ -369,6 +369,18 @@ class TestCParser_fundamentals(TestCParser_base): ['PtrDecl', ['PtrDecl', ['PtrDecl', ['ArrayDecl', '40', [], ['TypeDecl', ['IdentifierType', ['char']]]]]]]]) + self.assertEqual(self.get_decl('int (*const*const x)(char, int);'), + ['Decl', + 'x', + ['PtrDecl', + ['const'], + ['PtrDecl', + ['const'], + ['FuncDecl', + [['Typename', ['TypeDecl', ['IdentifierType', ['char']]]], + ['Typename', ['TypeDecl', ['IdentifierType', ['int']]]]], + ['TypeDecl', ['IdentifierType', ['int']]]]]]]) + self.assertEqual(self.get_decl('int (*x[4])(char, int);'), ['Decl', 'x', ['ArrayDecl', '4', [], |