|
|
@ -87,7 +87,7 @@ func RunVmTest(p string, t *testing.T) { |
|
|
|
vm.Debug = true |
|
|
|
vm.Debug = true |
|
|
|
glog.SetV(4) |
|
|
|
glog.SetV(4) |
|
|
|
glog.SetToStderr(true) |
|
|
|
glog.SetToStderr(true) |
|
|
|
if name != "stackLimitPush32_1024" { |
|
|
|
if name != "Call50000_sha256" { |
|
|
|
continue |
|
|
|
continue |
|
|
|
} |
|
|
|
} |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -128,10 +128,16 @@ func RunVmTest(p string, t *testing.T) { |
|
|
|
ret, logs, gas, err = helper.RunState(statedb, env, test.Transaction) |
|
|
|
ret, logs, gas, err = helper.RunState(statedb, env, test.Transaction) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch name { |
|
|
|
|
|
|
|
// the memory required for these tests (4294967297 bytes) would take too much time.
|
|
|
|
|
|
|
|
// on 19 May 2015 decided to skip these tests their output.
|
|
|
|
|
|
|
|
case "mload32bitBound_return", "mload32bitBound_return2": |
|
|
|
|
|
|
|
default: |
|
|
|
rexp := helper.FromHex(test.Out) |
|
|
|
rexp := helper.FromHex(test.Out) |
|
|
|
if bytes.Compare(rexp, ret) != 0 { |
|
|
|
if bytes.Compare(rexp, ret) != 0 { |
|
|
|
t.Errorf("%s's return failed. Expected %x, got %x\n", name, rexp, ret) |
|
|
|
t.Errorf("%s's return failed. Expected %x, got %x\n", name, rexp, ret) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if isVmTest { |
|
|
|
if isVmTest { |
|
|
|
if len(test.Gas) == 0 && err == nil { |
|
|
|
if len(test.Gas) == 0 && err == nil { |
|
|
@ -246,8 +252,7 @@ func TestLogTest(t *testing.T) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func TestPerformance(t *testing.T) { |
|
|
|
func TestPerformance(t *testing.T) { |
|
|
|
t.Skip() |
|
|
|
const fn = "../files/VMTests/vmPerformanceTest.json" |
|
|
|
const fn = "../files/VMTests/vmPerformance.json" |
|
|
|
|
|
|
|
RunVmTest(fn, t) |
|
|
|
RunVmTest(fn, t) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -342,13 +347,11 @@ func TestMemory(t *testing.T) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func TestMemoryStress(t *testing.T) { |
|
|
|
func TestMemoryStress(t *testing.T) { |
|
|
|
t.Skip("Skipped due to...consuming too much memory :D") |
|
|
|
|
|
|
|
const fn = "../files/StateTests/stMemoryStressTest.json" |
|
|
|
const fn = "../files/StateTests/stMemoryStressTest.json" |
|
|
|
RunVmTest(fn, t) |
|
|
|
RunVmTest(fn, t) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func TestQuadraticComplexity(t *testing.T) { |
|
|
|
func TestQuadraticComplexity(t *testing.T) { |
|
|
|
t.Skip() // takes too long
|
|
|
|
|
|
|
|
const fn = "../files/StateTests/stQuadraticComplexityTest.json" |
|
|
|
const fn = "../files/StateTests/stQuadraticComplexityTest.json" |
|
|
|
RunVmTest(fn, t) |
|
|
|
RunVmTest(fn, t) |
|
|
|
} |
|
|
|
} |
|
|
|