Skip to content

Commit da2f151

Browse files
committed
Rename test field cRet -> precompileRet
1 parent 1ba366b commit da2f151

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

libevm/legacy/legacy_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func TestPrecompiledStatefulContract_Upgrade(t *testing.T) {
4949

5050
tests := map[string]struct {
5151
envGas uint64
52-
cRet []byte
52+
precompileRet []byte
5353
cRemainingGas uint64
5454
cErr error
5555
wantRet []byte
@@ -58,7 +58,7 @@ func TestPrecompiledStatefulContract_Upgrade(t *testing.T) {
5858
}{
5959
"call_error": {
6060
envGas: 10,
61-
cRet: []byte{2},
61+
precompileRet: []byte{2},
6262
cRemainingGas: 6,
6363
cErr: errors.New("test error"),
6464
wantRet: []byte{2},
@@ -67,19 +67,19 @@ func TestPrecompiledStatefulContract_Upgrade(t *testing.T) {
6767
},
6868
"remaining_gas_exceeds_supplied_gas": {
6969
envGas: 10,
70-
cRet: []byte{2},
70+
precompileRet: []byte{2},
7171
cRemainingGas: 11,
7272
wantErr: "remaining gas 11 exceeds supplied gas 10",
7373
},
7474
"zero_remaining_gas": {
75-
envGas: 10,
76-
cRet: []byte{2},
77-
wantRet: []byte{2},
78-
wantGasUsed: 10,
75+
envGas: 10,
76+
precompileRet: []byte{2},
77+
wantRet: []byte{2},
78+
wantGasUsed: 10,
7979
},
8080
"used_one_gas": {
8181
envGas: 10,
82-
cRet: []byte{2},
82+
precompileRet: []byte{2},
8383
cRemainingGas: 9,
8484
wantRet: []byte{2},
8585
wantGasUsed: 1,
@@ -95,7 +95,7 @@ func TestPrecompiledStatefulContract_Upgrade(t *testing.T) {
9595
gasToReturn: testCase.envGas,
9696
}
9797
c := PrecompiledStatefulContract(func(env vm.PrecompileEnvironment, input []byte, suppliedGas uint64) (ret []byte, remainingGas uint64, err error) {
98-
return testCase.cRet, testCase.cRemainingGas, testCase.cErr
98+
return testCase.precompileRet, testCase.cRemainingGas, testCase.cErr
9999
})
100100

101101
upgraded := c.Upgrade()

0 commit comments

Comments
 (0)