Skip to content

Commit

Permalink
Modify the variable names in the unit test cases to make them more de…
Browse files Browse the repository at this point in the history
…scriptive and clear
  • Loading branch information
JustXxx committed Oct 31, 2024
1 parent bdb79dd commit 134a07c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions op-challenger2/game/fault/types/position_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ func TestRelativeMoves(t *testing.T) {

func TestMoveN(t *testing.T) {
tests0 := []struct {
startGIndex *big.Int
defendGIndex *big.Int
startGIndex *big.Int
postGIndex *big.Int
}{
{bi(1), bi(4)},
{bi(2), bi(8)},
Expand All @@ -329,12 +329,12 @@ func TestMoveN(t *testing.T) {
for _, test := range tests0 {
pos := NewPositionFromGIndex(test.startGIndex)
result := pos.MoveN(depth, branch)
require.Equalf(t, test.defendGIndex, result.ToGIndex(), "move GIndex %s, expected=%s, got=%s", test.startGIndex, test.defendGIndex, result.ToGIndex())
require.Equalf(t, test.postGIndex, result.ToGIndex(), "move GIndex %s, expected=%s, got=%s", test.startGIndex, test.postGIndex, result.ToGIndex())
}

tests1 := []struct {
startGIndex *big.Int
defendGIndex *big.Int
startGIndex *big.Int
postGIndex *big.Int
}{
{bi(2), bi(12)},
{bi(4), bi(20)},
Expand All @@ -345,7 +345,7 @@ func TestMoveN(t *testing.T) {
for _, test := range tests1 {
pos := NewPositionFromGIndex(test.startGIndex)
result := pos.MoveN(depth, branch)
require.Equalf(t, test.defendGIndex, result.ToGIndex(), "move GIndex %s, expected=%s, got=%s", test.startGIndex, test.defendGIndex, result.ToGIndex())
require.Equalf(t, test.postGIndex, result.ToGIndex(), "move GIndex %s, expected=%s, got=%s", test.startGIndex, test.postGIndex, result.ToGIndex())
}

tests3 := []struct {
Expand Down

0 comments on commit 134a07c

Please sign in to comment.