Commit 27bf62a6 authored by George Hotz's avatar George Hotz

minor test touch up

parent 5244cf21
......@@ -44,7 +44,7 @@ contract MIPS {
if (address(m) != address(0)) {
emit DidWriteMemory(addr, value);
bytes32 newStateHash = m.WriteMemory(stateHash, addr, value);
require(ReadMemory(newStateHash, addr) == value, "memory readback check failed");
require(m.ReadMemory(newStateHash, addr) == value, "memory readback check failed");
return newStateHash;
} else {
assembly {
......
......@@ -2,28 +2,28 @@ package main
import (
"fmt"
uc "github.com/unicorn-engine/unicorn/bindings/go/unicorn"
"log"
"sync"
"testing"
"time"
)
func RegSerialize(ram map[uint32](uint32)) []uint32 {
ret := []uint32{ram[0xc0000080], uint32(len(ram))}
// 36 registers, 32 basic + pc + hi/lo + heap
for i := uint32(0xc0000000); i < 0xc0000000+36*4; i += 4 {
ret = append(ret, ram[i])
}
return ret
}
var done sync.Mutex
uc "github.com/unicorn-engine/unicorn/bindings/go/unicorn"
)
func TestCompare(t *testing.T) {
func TestCompareUnicornEvm(t *testing.T) {
fn := "../mipigo/test/test.bin"
//fn := "../mipigo/minigeth.bin"
var done sync.Mutex
RegSerialize := func(ram map[uint32](uint32)) []uint32 {
ret := []uint32{ram[0xc0000080], uint32(len(ram))}
// 36 registers, 32 basic + pc + hi/lo + heap
for i := uint32(0xc0000000); i < 0xc0000000+36*4; i += 4 {
ret = append(ret, ram[i])
}
return ret
}
steps := 1000000000
//steps := 1165
//steps := 1180
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment