Skip to content

Commit

Permalink
rm unused testcase field
Browse files Browse the repository at this point in the history
  • Loading branch information
s1na committed May 20, 2022
1 parent bb75165 commit ff555f8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions eth/tracers/js/tracer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ func TestTracer(t *testing.T) {
for i, tt := range []struct {
code string
want string
fail string
}{
{ // tests that we don't panic on bad arguments to memory access
code: "{depths: [], step: function(log) { this.depths.push(log.memory.slice(-1,-2)); }, fault: function() {}, result: function() { return this.depths; }}",
Expand Down Expand Up @@ -138,8 +137,12 @@ func TestTracer(t *testing.T) {
want: `{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0}`,
},
} {
if have, err := execTracer(tt.code); tt.want != string(have) || tt.fail != err {
t.Errorf("testcase %d: expected return value to be '%s' got '%s', error to be '%s' got '%s'\n\tcode: %v", i, tt.want, string(have), tt.fail, err, tt.code)
have, err := execTracer(tt.code)
if err != "" {
t.Errorf("testcase %d: failed with error '%s'\n", i, err)
}
if tt.want != string(have) {
t.Errorf("testcase %d: expected return value to be '%s' got '%s'\n\tcode: %v", i, tt.want, string(have), tt.code)
}
}
}
Expand Down

0 comments on commit ff555f8

Please sign in to comment.