Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
34035f3d
Commit
34035f3d
authored
Jun 26, 2023
by
Andreas Bigger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add suffices to the fault dispute game tests
parent
d6b7236b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
.gas-snapshot
packages/contracts-bedrock/.gas-snapshot
+13
-13
FaultDisputeGame.t.sol
...s/contracts-bedrock/contracts/test/FaultDisputeGame.t.sol
+4
-4
No files found.
packages/contracts-bedrock/.gas-snapshot
View file @
34035f3d
...
@@ -40,21 +40,21 @@ FaultDisputeGame_ResolvesCorrectly_IncorrectRoot3:test_resolvesCorrectly_succeed
...
@@ -40,21 +40,21 @@ FaultDisputeGame_ResolvesCorrectly_IncorrectRoot3:test_resolvesCorrectly_succeed
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot:test_resolvesCorrectly_succeeds() (gas: 487044)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot:test_resolvesCorrectly_succeeds() (gas: 487044)
FaultDisputeGame_Test:test_defendRoot_invalidMove_reverts() (gas: 13294)
FaultDisputeGame_Test:test_defendRoot_invalidMove_reverts() (gas: 13294)
FaultDisputeGame_Test:test_extraData_succeeds() (gas: 17426)
FaultDisputeGame_Test:test_extraData_succeeds() (gas: 17426)
FaultDisputeGame_Test:test_gameData_succeeds() (gas: 17
873
)
FaultDisputeGame_Test:test_gameData_succeeds() (gas: 17
917
)
FaultDisputeGame_Test:test_gameStart_succeeds() (gas: 10315)
FaultDisputeGame_Test:test_gameStart_succeeds() (gas: 10315)
FaultDisputeGame_Test:test_gameType_succeeds() (gas: 82
38
)
FaultDisputeGame_Test:test_gameType_succeeds() (gas: 82
82
)
FaultDisputeGame_Test:test_initialRootClaimData_succeeds() (gas: 17
713
)
FaultDisputeGame_Test:test_initialRootClaimData_succeeds() (gas: 17
691
)
FaultDisputeGame_Test:test_move_clockTimeExceeded_reverts() (gas: 26
432
)
FaultDisputeGame_Test:test_move_clockTimeExceeded_reverts() (gas: 26
387
)
FaultDisputeGame_Test:test_move_duplicateClaim_reverts() (gas: 1032
75
)
FaultDisputeGame_Test:test_move_duplicateClaim_reverts() (gas: 1032
30
)
FaultDisputeGame_Test:test_move_gameDepthExceeded_reverts() (gas: 408100)
FaultDisputeGame_Test:test_move_gameDepthExceeded_reverts() (gas: 408100)
FaultDisputeGame_Test:test_move_gameNotInProgress_reverts() (gas: 109
68
)
FaultDisputeGame_Test:test_move_gameNotInProgress_reverts() (gas: 109
23
)
FaultDisputeGame_Test:test_move_nonExistentParent_reverts() (gas: 246
98
)
FaultDisputeGame_Test:test_move_nonExistentParent_reverts() (gas: 246
55
)
FaultDisputeGame_Test:test_resolve_challengeContested
() (gas: 221135
)
FaultDisputeGame_Test:test_resolve_challengeContested
_succeeds() (gas: 221201
)
FaultDisputeGame_Test:test_resolve_notInProgress_reverts() (gas: 96
35
)
FaultDisputeGame_Test:test_resolve_notInProgress_reverts() (gas: 96
79
)
FaultDisputeGame_Test:test_resolve_rootContested
() (gas: 106143
)
FaultDisputeGame_Test:test_resolve_rootContested
_succeeds() (gas: 106068
)
FaultDisputeGame_Test:test_resolve_rootUncontested
() (gas: 23625
)
FaultDisputeGame_Test:test_resolve_rootUncontested
_succeeds() (gas: 23692
)
FaultDisputeGame_Test:test_resolve_teamDeathmatch
() (gas: 391864
)
FaultDisputeGame_Test:test_resolve_teamDeathmatch
_succeeds() (gas: 391875
)
FaultDisputeGame_Test:test_rootClaim_succeeds() (gas: 81
59
)
FaultDisputeGame_Test:test_rootClaim_succeeds() (gas: 81
81
)
FaultDisputeGame_Test:test_simpleAttack_succeeds() (gas: 107388)
FaultDisputeGame_Test:test_simpleAttack_succeeds() (gas: 107388)
FeeVault_Test:test_constructor_succeeds() (gas: 18185)
FeeVault_Test:test_constructor_succeeds() (gas: 18185)
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_0() (gas: 352135)
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_0() (gas: 352135)
...
...
packages/contracts-bedrock/contracts/test/FaultDisputeGame.t.sol
View file @
34035f3d
...
@@ -236,7 +236,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
...
@@ -236,7 +236,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
}
}
/// @dev Static unit test for the correctness an uncontested root resolution.
/// @dev Static unit test for the correctness an uncontested root resolution.
function test_resolve_rootUncontested() public {
function test_resolve_rootUncontested
_succeeds
() public {
GameStatus status = gameProxy.resolve();
GameStatus status = gameProxy.resolve();
assertEq(uint8(status), uint8(GameStatus.DEFENDER_WINS));
assertEq(uint8(status), uint8(GameStatus.DEFENDER_WINS));
assertEq(uint8(gameProxy.status()), uint8(GameStatus.DEFENDER_WINS));
assertEq(uint8(gameProxy.status()), uint8(GameStatus.DEFENDER_WINS));
...
@@ -260,7 +260,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
...
@@ -260,7 +260,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
}
}
/// @dev Static unit test for the correctness of resolving a single attack game state.
/// @dev Static unit test for the correctness of resolving a single attack game state.
function test_resolve_rootContested() public {
function test_resolve_rootContested
_succeeds
() public {
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5))));
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5))));
GameStatus status = gameProxy.resolve();
GameStatus status = gameProxy.resolve();
...
@@ -269,7 +269,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
...
@@ -269,7 +269,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
}
}
/// @dev Static unit test for the correctness of resolving a game with a contested challenge claim.
/// @dev Static unit test for the correctness of resolving a game with a contested challenge claim.
function test_resolve_challengeContested() public {
function test_resolve_challengeContested
_succeeds
() public {
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5))));
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5))));
gameProxy.defend(1, Claim.wrap(bytes32(uint256(6))));
gameProxy.defend(1, Claim.wrap(bytes32(uint256(6))));
...
@@ -279,7 +279,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
...
@@ -279,7 +279,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
}
}
/// @dev Static unit test for the correctness of resolving a game with multiplayer moves.
/// @dev Static unit test for the correctness of resolving a game with multiplayer moves.
function test_resolve_teamDeathmatch() public {
function test_resolve_teamDeathmatch
_succeeds
() public {
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5))));
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5))));
gameProxy.attack(0, Claim.wrap(bytes32(uint256(4))));
gameProxy.attack(0, Claim.wrap(bytes32(uint256(4))));
gameProxy.defend(1, Claim.wrap(bytes32(uint256(6))));
gameProxy.defend(1, Claim.wrap(bytes32(uint256(6))));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment