MCPcopy Create free account
hub / github.com/gokcehan/lf / TestScan

Function TestScan

eval_test.go:492–506  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

490}
491
492func 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
508func TestParse(t *testing.T) {
509 for _, test := range gEvalTests {

Callers

nothing calls this directly

Calls 2

newScannerFunction · 0.85
scanMethod · 0.80

Tested by

no test coverage detected