Commit 82c48d69 authored by Sean DuBois's avatar Sean DuBois

Add test for MEMO opCode

parent ab98c3de
......@@ -176,3 +176,16 @@ func BenchmarkSpeed(b *testing.B) {
}
}
}
func TestMemoOpCode(t *testing.T) {
buf := bytes.NewBufferString("I5\n\x94.")
dec := NewDecoder(buf)
_, err := dec.Decode()
if err != nil {
t.Errorf("Error from TestMemoOpCode - %v\n", err)
}
if dec.memo["0"] != int64(5) {
t.Errorf("Error from TestMemoOpCode - Top stack value was not added to memo")
}
}
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