summaryrefslogtreecommitdiff
path: root/tests/test_c_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_c_parser.py')
-rwxr-xr-xtests/test_c_parser.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_c_parser.py b/tests/test_c_parser.py
index 761d902..e32c49d 100755
--- a/tests/test_c_parser.py
+++ b/tests/test_c_parser.py
@@ -496,6 +496,15 @@ class TestCParser_fundamentals(TestCParser_base):
s4 = compound.block_items[3].init
self.assertTrue(isinstance(s4.args.exprs[1], ArrayRef))
+ def test_compound_statement(self):
+ e = """
+ void foo() {
+ }
+ """
+ compound = self.parse(e).ext[0].body
+ self.assertTrue(isinstance(compound, Compound))
+ self.assert_coord(compound, 2, '')
+
# The C99 compound literal feature
#
def test_compound_literals(self):