diff options
Diffstat (limited to 'tests/test_c_parser.py')
-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 8c1ccc5..492cbd1 100755 --- a/tests/test_c_parser.py +++ b/tests/test_c_parser.py @@ -545,6 +545,18 @@ class TestCParser_fundamentals(TestCParser_base): self.assertIsInstance(pdecl, PtrDecl) self.assertEqual(pdecl.quals, ['const']) + def test_atomic_specifier(self): + self.assertEqual(self.get_decl('_Atomic(int) ai;'), + ['Decl', + ['_Atomic'], + 'ai', + ['TypeDecl', ['IdentifierType', ['int']]]]) + + self.assertEqual(self.get_decl('_Atomic(int*) ai;'), + ['Decl', + 'ai', + ['TypeDecl', ['PtrDecl', ['_Atomic'], ['IdentifierType', ['int']]]]]) + def test_sizeof(self): e = """ void foo() |