diff options
author | ldore <laurent.dore@gmail.com> | 2018-04-26 14:07:08 +0200 |
---|---|---|
committer | Eli Bendersky <eliben@users.noreply.github.com> | 2018-04-26 05:07:08 -0700 |
commit | a2a8f4a384bd86efc9faff9030fbb8d905a8ecee (patch) | |
tree | 7b53e31a8328204ae97b0b10fb37bbf09a150d99 /tests | |
parent | 168f54c3ae324c3827d22fb90e456653e6fe584a (diff) | |
download | pycparser-a2a8f4a384bd86efc9faff9030fbb8d905a8ecee.tar.gz |
Fix non-generated constant expressions in designated initializers (#246) (#255)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_c_generator.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_c_generator.py b/tests/test_c_generator.py index 9385e80..4e38f28 100644 --- a/tests/test_c_generator.py +++ b/tests/test_c_generator.py @@ -228,6 +228,11 @@ class TestCtoC(unittest.TestCase): } ''') + def test_issue246(self): + self._assert_ctoc_correct(r''' + int array[3] = {[0] = 0, [1] = 1, [1+1] = 2}; + ''') + def test_exprlist_with_semi(self): self._assert_ctoc_correct(r''' void x() { |