diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_generated_cases.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Lib/test/test_generated_cases.py b/Lib/test/test_generated_cases.py index cd3718b..95813e1 100644 --- a/Lib/test/test_generated_cases.py +++ b/Lib/test/test_generated_cases.py @@ -1270,6 +1270,33 @@ class TestGeneratedCases(unittest.TestCase): """ self.run_cases_test(input, output) + def test_error_if_true(self): + + input = """ + inst(OP1, ( --)) { + ERROR_IF(true, here); + } + inst(OP2, ( --)) { + ERROR_IF(1, there); + } + """ + output = """ + TARGET(OP1) { + frame->instr_ptr = next_instr; + next_instr += 1; + INSTRUCTION_STATS(OP1); + goto here; + } + + TARGET(OP2) { + frame->instr_ptr = next_instr; + next_instr += 1; + INSTRUCTION_STATS(OP2); + goto there; + } + """ + self.run_cases_test(input, output) + def test_scalar_array_inconsistency(self): input = """ |