diff options
author | ldore <laurent.dore@gmail.com> | 2018-04-28 05:09:24 +0200 |
---|---|---|
committer | Eli Bendersky <eliben@users.noreply.github.com> | 2018-04-27 20:09:24 -0700 |
commit | 81a12ca210a75969ca0d2a606369e65968cf14a6 (patch) | |
tree | bb1c67a850731751ecbc64c80b21c802de84f1d8 /tests/test_c_generator.py | |
parent | a2a8f4a384bd86efc9faff9030fbb8d905a8ecee (diff) | |
download | pycparser-81a12ca210a75969ca0d2a606369e65968cf14a6.tar.gz |
Add support for empty struct (#66) (#254)
Diffstat (limited to 'tests/test_c_generator.py')
-rw-r--r-- | tests/test_c_generator.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_c_generator.py b/tests/test_c_generator.py index 4e38f28..3727f91 100644 --- a/tests/test_c_generator.py +++ b/tests/test_c_generator.py @@ -213,6 +213,18 @@ class TestCtoC(unittest.TestCase): return 0; }''') + def test_issue66(self): + # A non-existing body must not be generated + # (previous valid behavior, still working) + self._assert_ctoc_correct(r''' + struct foo; + ''') + # An empty body must be generated + # (added behavior) + self._assert_ctoc_correct(r''' + struct foo {}; + ''') + def test_issue83(self): self._assert_ctoc_correct(r''' void x(void) { |