good morning!!!!

Skip to content
Snippets Groups Projects
Commit 56213089 authored by Gustav Simonsson's avatar Gustav Simonsson
Browse files

tests: add test for StateTests/stCallCodes.json

parent e40b447f
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -115,6 +115,13 @@ func TestCallCreateCallCode(t *testing.T) {
}
}
func TestCallCodes(t *testing.T) {
fn := filepath.Join(stateTestDir, "stCallCodes.json")
if err := RunStateTest(fn, StateSkipTests); err != nil {
t.Error(err)
}
}
func TestMemory(t *testing.T) {
fn := filepath.Join(stateTestDir, "stMemoryTest.json")
if err := RunStateTest(fn, StateSkipTests); err != nil {
......
......@@ -128,6 +128,7 @@ func runStateTests(tests map[string]VmTest, skipTests []string) error {
return nil
}
//fmt.Println("StateTest name:", name)
if err := runStateTest(test); err != nil {
return fmt.Errorf("%s: %s\n", name, err.Error())
}
......@@ -172,7 +173,7 @@ func runStateTest(test VmTest) error {
ret, logs, _, _ = RunState(statedb, env, test.Transaction)
// // Compare expected and actual return
// Compare expected and actual return
rexp := common.FromHex(test.Out)
if bytes.Compare(rexp, ret) != 0 {
return fmt.Errorf("return failed. Expected %x, got %x\n", rexp, ret)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment