More opcode tests

This commit is contained in:
Ian Gulliver
2021-11-19 07:24:16 -10:00
parent b0ee500304
commit cfec23f4e9
2 changed files with 95 additions and 0 deletions

View File

@@ -30,3 +30,10 @@ func expectGlobalMemory(t *testing.T, state *vm.State, i uint64, expected uint64
t.Fatalf("Global memory index %d: expected=%d actual=%d\n", i, expected, actual)
}
}
func expectGlobalMemorySigned(t *testing.T, state *vm.State, i uint64, expected int64) {
actual := int64(state.GlobalMemory().MustReadUnsigned(i))
if actual != expected {
t.Fatalf("Global memory index %d: expected=%d actual=%d\n", i, expected, actual)
}
}