diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-13 15:10:16 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-13 15:10:16 -0300 |
| commit | 9656105cb4c902213f281e658dd88286cc2df8ed (patch) | |
| tree | def1582280f4925688646dcfd14619f3c727b199 /gui/test | |
| parent | 4b76c25dc90417a9d6c3d4cd5af0dd3d4c087520 (diff) | |
| download | computeranim-9656105cb4c902213f281e658dd88286cc2df8ed.tar.gz computeranim-9656105cb4c902213f281e658dd88286cc2df8ed.zip | |
Diffstat (limited to 'gui/test')
| -rw-r--r-- | gui/test/lenses.py | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/gui/test/lenses.py b/gui/test/lenses.py index 528c656..e42e6fe 100644 --- a/gui/test/lenses.py +++ b/gui/test/lenses.py @@ -213,6 +213,33 @@ key escape console mouse-button 3 400 180 expect focus memory expect nav[2].place.address {head + 16} +# Register hints use the displayed value and the same address interactions. +console set annotations true +frames 40 +move 0 0 +frames 30 +screenshot {out / 'hint-before.png'} +move 640 180 +frames 30 +screenshot {out / 'hint-hover.png'} +expect-different-screenshot {out / 'hint-before.png'} {out / 'hint-hover.png'} 612 168 144 24 +click 640 180 +expect lens_count 1 +print lenses[0].address +key escape +console mouse-button 3 640 180 +expect focus stack +print nav[1].place.address +click 850 180 +expect lenses[0].address {head} +key escape +console mouse-button 3 850 180 +expect focus memory +expect nav[2].place.address {head} +# The scalar index is not an address. +click 1000 180 +expect lens_count 0 +console set annotations false # Historical operands use historical registers, without another execution. key left_bracket expect following false @@ -236,11 +263,11 @@ expect-no-log backdrop shader first = int(re.search(r'lenses\[0\].first = (\d+)', stderr)[1]) assert first > code, (first, code) stack_addresses = re.findall(r'(?:lenses\[0\].address|nav\[1\].place.address) = (\d+)', stderr) - assert len(stack_addresses) == 10, stack_addresses - base, negative, followed, zero, positive, pointer, pointer_followed, operand, operand_followed, historical = map(int, stack_addresses) + assert len(stack_addresses) == 12, stack_addresses + base, negative, followed, zero, positive, pointer, pointer_followed, operand, operand_followed, hint, hint_followed, historical = map(int, stack_addresses) assert base == negative == followed and zero == base + 24 and positive == base + 32, stack_addresses assert pointer == pointer_followed, stack_addresses - assert operand == operand_followed == historical == pointer + 8, stack_addresses + assert operand == operand_followed == hint == hint_followed == historical == pointer + 8, stack_addresses stops = re.findall(r'stops = (\d+)', stderr) assert len(stops) == 2 and stops[0] == stops[1], stops for recording in Path('/tmp').glob(f'ztrace-gui-{run.pid}-*.ztrace'): |
