diff options
Diffstat (limited to 'tests/test_c_generator.py')
-rw-r--r-- | tests/test_c_generator.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_c_generator.py b/tests/test_c_generator.py index b2b3199..a21a0b1 100644 --- a/tests/test_c_generator.py +++ b/tests/test_c_generator.py @@ -201,5 +201,12 @@ class TestCtoC(unittest.TestCase): int main(void) { f((1, 2)); return 0; } ''') + def test_comma_op_in_ternary(self): + self._assert_ctoc_correct(r''' + void f() { + (0, 0) ? (0, 0) : (0, 0); + } + ''') + if __name__ == "__main__": unittest.main() |