Skip to content

Commit

Permalink
🚨 [channel,wallet] Fix gocritic linter errors
Browse files Browse the repository at this point in the history
Signed-off-by: Manoranjith <[email protected]>
  • Loading branch information
manoranjith committed Nov 30, 2021
1 parent 9945243 commit 87e57af
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion channel/allocation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func TestBalancesEqualAndAssertEqual(t *testing.T) {
assert.False(b1.Equal(b2))
assert.Error(b1.AssertEqual(b2))

assert.True(b1.Equal(b1))
assert.True(b1.Equal(b1)) //nolint: gocritic
assert.NoError(b1.AssertEqual(b1))
})
}
Expand Down
4 changes: 2 additions & 2 deletions channel/test/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ func ensureBalanceVectorLength(bals []channel.Bal, l int) []channel.Bal {

// GenericStateEqualTest tests the State.Equal function.
func GenericStateEqualTest(t *testing.T, s1, s2 *channel.State, opts ...GenericTestOption) {
assert.NoError(t, s1.Equal(s1))
assert.NoError(t, s2.Equal(s2))
assert.NoError(t, s1.Equal(s1)) //nolint: gocritic
assert.NoError(t, s2.Equal(s2)) //nolint: gocritic

for _, differentState := range buildModifiedStates(s1, s2, opts...) {
assert.Error(t, differentState.Equal(s1))
Expand Down
4 changes: 2 additions & 2 deletions wallet/test/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ func TestAddress(t *testing.T, s *Setup) {

// Test Address.Equals.
assert.False(t, addr.Equals(null), "Expected inequality of zero, nonzero address")
assert.True(t, null.Equals(null), "Expected equality of zero address to itself")
assert.True(t, null.Equals(null), "Expected equality of zero address to itself") //nolint: gocritic

// Test Address.Cmp.
assert.Positive(t, addr.Cmp(null), "Expected addr > zero")
assert.Zero(t, null.Cmp(null), "Expected zero = zero")
assert.Zero(t, null.Cmp(null), "Expected zero = zero") //nolint: gocritic
assert.Negative(t, null.Cmp(addr), "Expected null < addr")

// Test Address.Bytes.
Expand Down

0 comments on commit 87e57af

Please sign in to comment.