| 519 | } |
| 520 | |
| 521 | func TestCALLInstructionString(t *testing.T) { |
| 522 | var TABLE map[Instruction]string = map[Instruction]string{ |
| 523 | CALL{LABEL{"foo"}}: "CALL foo", |
| 524 | CALL{LABEL{"bar"}}: "CALL bar", |
| 525 | } |
| 526 | |
| 527 | for ins, expected := range TABLE { |
| 528 | if ins.String() != expected { |
| 529 | t.Logf("Expected %s got %s when testing %s", expected, ins.String(), ins) |
| 530 | t.FailNow() |
| 531 | } |
| 532 | } |
| 533 | } |
| 534 | func TestCALLInstruction(t *testing.T) { |
| 535 | var TABLE map[Instruction][]uint16 = map[Instruction][]uint16{ |
| 536 | CALL{LABEL{"foo"}}: []uint16{0x23, 0x1234, 0x40, 0x0001}, |