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

Function TestCALLInstructionString

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

Source from the content-addressed store, hash-verified

519}
520
521func 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}
534func TestCALLInstruction(t *testing.T) {
535 var TABLE map[Instruction][]uint16 = map[Instruction][]uint16{
536 CALL{LABEL{"foo"}}: []uint16{0x23, 0x1234, 0x40, 0x0001},

Callers

nothing calls this directly

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected