Skip to content

Commit cd7d53c

Browse files
committed
fix: Clock test (make lib call external)
1 parent 4dc5078 commit cd7d53c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

prt/contracts/test/Clock.t.sol

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ import "src/tournament/libs/Clock.sol";
1616

1717
pragma solidity ^0.8.0;
1818

19+
library ExternalClock {
20+
function advanceClockExternal(Clock.State storage state) external {
21+
Clock.advanceClock(state);
22+
}
23+
}
24+
1925
contract ClockTest is Test {
2026
using Clock for Clock.State;
27+
using ExternalClock for Clock.State;
2128
using Time for Time.Instant;
2229

2330
Clock.State clock1;
@@ -69,6 +76,6 @@ contract ClockTest is Test {
6976
assertTrue(!clock1.hasTimeLeft(), "clock1 should run out of time");
7077

7178
vm.expectRevert("can't advance clock with no time left");
72-
clock1.advanceClock();
79+
clock1.advanceClockExternal();
7380
}
7481
}

0 commit comments

Comments
 (0)