Skip to content

Commit bd1d8cc

Browse files
refactor: use uint256.Int.Eq in tests and %d verb
Co-authored-by: Stephen Buttolph <[email protected]> Signed-off-by: Arran Schlosberg <[email protected]>
1 parent 4118dfe commit bd1d8cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/state_transition.libevm_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ func TestMinimumGasConsumption(t *testing.T) {
192192
t.Errorf("After core.ApplyMessage(..., *%T); got %[1]T = %[1]d; want %d", gotPool, wantPool)
193193
}
194194

195-
wantBalance := startingBalance - tt.wantUsed*gasPrice
196-
if got := stateDB.GetBalance(from); !got.IsUint64() || got.Uint64() != wantBalance {
197-
t.Errorf("got remaining balance %s; want %d", got.String(), wantBalance)
195+
wantBalance := uint256.NewInt(startingBalance - tt.wantUsed*gasPrice)
196+
if got := stateDB.GetBalance(from); !got.Eq(wantBalance) {
197+
t.Errorf("got remaining balance %d; want %d", got, wantBalance)
198198
}
199199
})
200200
}

0 commit comments

Comments
 (0)