Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WolframAlph committed Jan 12, 2025
1 parent fa8da4e commit 0db590a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Lib/test/test_generated_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -1639,6 +1639,33 @@ def test_escaping_call_next_to_cmacro(self):
"""
self.run_cases_test(input, output)

def test_escaping_call_next_to_comment(self):
input = """
inst(OP, (--)) {
escaping_call();
// comment
another_escaping_call();
/* another comment */
yet_another_escaping_call();
}
"""
output = """
TARGET(OP) {
frame->instr_ptr = next_instr;
next_instr += 1;
INSTRUCTION_STATS(OP);
_PyFrame_SetStackPointer(frame, stack_pointer);
escaping_call();
// comment
another_escaping_call();
/* another comment */
yet_another_escaping_call();
stack_pointer = _PyFrame_GetStackPointer(frame);
DISPATCH();
}
"""
self.run_cases_test(input, output)

def test_pop_dead_inputs_all_live(self):
input = """
inst(OP, (a, b --)) {
Expand Down

0 comments on commit 0db590a

Please sign in to comment.