Skip to content

Commit

Permalink
fix timing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrk24 committed Oct 1, 2024
1 parent 734c5c7 commit c3a53a1
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/instruction.hh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ struct instruction_pointer;
// A variant-like type.
class instruction {
friend class assembly_scanner;
friend class program_walker;

template<typename T>
using pair = std::pair<T, T>;
Expand Down
2 changes: 2 additions & 0 deletions src/program_walker.hh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ public:
} else {
return instruction::branch_to({ { SIZE_C(0), SIZE_C(0) }, { SIZE_C(0), SIZE_C(0) } });
}
} else if (op == static_cast<int24_t>(SKP)) {
return instruction{ static_cast<instruction::operation>(SKP), instruction::argument() };
} else {
return instruction(ip, *m_program);
}
Expand Down
9 changes: 9 additions & 0 deletions tests/cli/thread_timing/g.trg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.
. .
. . .
. . . .
. . . . .
. } . . . .
. > ' 2 ' 2 !
\ { . . . . . .
. . > . ' 1 ! } .
9 changes: 9 additions & 0 deletions tests/cli/thread_timing/h.trg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.
. .
. . .
. . . .
. . . . .
. . . . . .
. > . ' 1 ! }
\ { . . . . . .
. . > ' 2 ' 2 ! }
10 changes: 10 additions & 0 deletions tests/cli/thread_timing/i.trg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.
. .
. . .
. . . .
. . . . .
. . . . . .
. } . . . . .
. > . ' 2 . . !
\ { . . . . . . .
. . > ' 1 ' 1 ! } .
10 changes: 10 additions & 0 deletions tests/cli/thread_timing/j.trg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.
. .
. . .
. . . .
. . . . .
. . . . . .
. . . . . . .
. > ' 1 ' 1 ! }
\ { . . . . . . .
. . > . ' 2 . . ! }

0 comments on commit c3a53a1

Please sign in to comment.