(t *testing.T)
| 463 | } |
| 464 | |
| 465 | func TestJMPInstructionString(t *testing.T) { |
| 466 | var TABLE map[Instruction]string = map[Instruction]string{ |
| 467 | JMP{LABEL{"foo"}}: "JMP foo", |
| 468 | JMP{LABEL{"bar"}}: "JMP bar", |
| 469 | } |
| 470 | |
| 471 | for ins, expected := range TABLE { |
| 472 | if ins.String() != expected { |
| 473 | t.Logf("Expected %s got %s when testing %s", expected, ins.String(), ins) |
| 474 | t.FailNow() |
| 475 | } |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | func TestJMPInstruction(t *testing.T) { |
| 480 | var TABLE map[Instruction][]uint16 = map[Instruction][]uint16{ |