diff options
author | ldore <laurent.dore@gmail.com> | 2022-11-10 14:30:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 05:30:04 -0800 |
commit | f5ca0284e2c1c9ac2a5be45735735f2f287073cc (patch) | |
tree | 5dc4a50b7b426b720109542545290fec113934c3 /tests/test_c_parser.py | |
parent | b13a06d22d05d47f115f3ed141f4fa727c654c6d (diff) | |
download | pycparser-f5ca0284e2c1c9ac2a5be45735735f2f287073cc.tar.gz |
Fix #479 (multi-pragma/single statement blocks) (#480)
Diffstat (limited to 'tests/test_c_parser.py')
-rwxr-xr-x | tests/test_c_parser.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_c_parser.py b/tests/test_c_parser.py index 4a5c90b..9b53622 100755 --- a/tests/test_c_parser.py +++ b/tests/test_c_parser.py @@ -1776,6 +1776,7 @@ class TestCParser_fundamentals(TestCParser_base): if (sum > 10) #pragma bar + #pragma baz sum = 10; switch (sum) @@ -1800,7 +1801,8 @@ class TestCParser_fundamentals(TestCParser_base): self.assertIsInstance(s1_ast.ext[0].body.block_items[4], If) self.assertIsInstance(s1_ast.ext[0].body.block_items[4].iftrue, Compound) self.assertIsInstance(s1_ast.ext[0].body.block_items[4].iftrue.block_items[0], Pragma) - self.assertIsInstance(s1_ast.ext[0].body.block_items[4].iftrue.block_items[1], Assignment) + self.assertIsInstance(s1_ast.ext[0].body.block_items[4].iftrue.block_items[1], Pragma) + self.assertIsInstance(s1_ast.ext[0].body.block_items[4].iftrue.block_items[2], Assignment) self.assertIsInstance(s1_ast.ext[0].body.block_items[5], Switch) self.assertIsInstance(s1_ast.ext[0].body.block_items[5].stmt.stmts[0], Compound) self.assertIsInstance(s1_ast.ext[0].body.block_items[5].stmt.stmts[0].block_items[0], |