Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Lib/test/test_generated_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,23 @@ def test_macro_instruction(self):
"""
self.run_cases_test(input, output)

def test_unused_cache(self):
input = """
inst(OP, (unused/1 --)) {
body();
}
"""
output = """
TARGET(OP) {
frame->instr_ptr = next_instr;
next_instr += 2;
INSTRUCTION_STATS(OP);
body();
DISPATCH();
}
"""
self.run_cases_test(input, output)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this test is covering everything that changed in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not, it is just a smoke test.
The real test is that everything continues to work properly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it would be nice if there was a test that adds a /* Skip N cache entries */ comment where it wasn't before this PR, so we could see regressions around that. (I don't care about the singular/plural, but I care about it appearing at all.)


def test_pseudo_instruction_no_flags(self):
input = """
pseudo(OP) = {
Expand Down
Loading