MCPcopy Create free account
hub / github.com/djhworld/simple-computer / TestJMPInstructionString

Function TestJMPInstructionString

asm/instructions_test.go:465–477  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

463}
464
465func 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
479func TestJMPInstruction(t *testing.T) {
480 var TABLE map[Instruction][]uint16 = map[Instruction][]uint16{

Callers

nothing calls this directly

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected