Skip to content

Commit bb6bfae

Browse files
committed
refactor: assert.Equal instead of t.Error
1 parent 4bd7cb5 commit bb6bfae

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

core/vm/preprocess.libevm_test.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,8 @@ func TestChargePreprocessingGas(t *testing.T) {
166166
}
167167
assert.Equalf(t, wantStatus, receipt.Status, "%T.Status", receipt)
168168

169-
if got, want := gotGasUsed, tt.wantGasUsed; got != want {
170-
t.Errorf("core.ApplyTransaction(..., &gotGasUsed, ...) got %d; want %d", got, want)
171-
}
172-
if got, want := receipt.GasUsed, tt.wantGasUsed; got != want {
173-
t.Errorf("core.ApplyTransaction(...) -> %T.GasUsed = %d; want %d", receipt, got, want)
174-
}
169+
assert.Equal(t, tt.wantGasUsed, gotGasUsed, "core.ApplyTransaction(..., &gotGasUsed, ...)")
170+
assert.Equalf(t, tt.wantGasUsed, receipt.GasUsed, "core.ApplyTransaction(...) -> %T.GasUsed", receipt)
175171
})
176172

177173
t.Run("VM_error", func(t *testing.T) {

0 commit comments

Comments
 (0)