updated testing"

This commit is contained in:
obscuren
2014-01-05 20:41:01 +01:00
parent 40dc4d0259
commit 1676930a16
3 changed files with 5 additions and 6 deletions

View File

@ -6,13 +6,13 @@ import (
)
func TestCompile(t *testing.T) {
instr, err := CompileInstr("SET 10 1")
instr, err := CompileInstr("PUSH")
if err != nil {
t.Error("Failed compiling instruction")
}
calc := (67 + 10 * 256 + 1 * int64(math.Pow(256,2)))
calc := (48 + 0 * 256 + 0 * int64(math.Pow(256,2)))
if Big(instr).Int64() != calc {
t.Error("Expected", calc, ", got:", instr)
}