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

Function TestParseDefLabel

asm/parse_test.go:9–30  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestParseDefLabel(t *testing.T) {
10 p := Parser{}
11
12 result, err := p.Parse(strings.NewReader(`
13 start:
14 end:
15 `))
16
17 expected := []Instruction{DEFLABEL{"start"}, DEFLABEL{"end"}}
18
19 if err != nil {
20 t.FailNow()
21 }
22
23 if result[0] != expected[0] {
24 t.FailNow()
25 }
26
27 if result[1] != expected[1] {
28 t.FailNow()
29 }
30}
31
32func TestParseDefSymbol(t *testing.T) {
33 p := Parser{}

Callers

nothing calls this directly

Calls 1

ParseMethod · 0.95

Tested by

no test coverage detected