(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func 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 | |
| 32 | func TestParseDefSymbol(t *testing.T) { |
| 33 | p := Parser{} |