(t *testing.T)
| 490 | } |
| 491 | |
| 492 | func TestScan(t *testing.T) { |
| 493 | for _, test := range gEvalTests { |
| 494 | s := newScanner(strings.NewReader(test.inp)) |
| 495 | |
| 496 | for _, tok := range test.toks { |
| 497 | if s.scan(); s.tok != tok { |
| 498 | t.Errorf("at input '%s' expected '%s' but scanned '%s'", test.inp, tok, s.tok) |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | if s.scan() { |
| 503 | t.Errorf("at input '%s' unexpected '%s'", test.inp, s.tok) |
| 504 | } |
| 505 | } |
| 506 | } |
| 507 | |
| 508 | func TestParse(t *testing.T) { |
| 509 | for _, test := range gEvalTests { |
nothing calls this directly
no test coverage detected