|
|
@ -55,12 +55,12 @@ func Test_Lexer(t *testing.T) {
|
|
|
|
for _, e := range tc.expected {
|
|
|
|
for _, e := range tc.expected {
|
|
|
|
n := l.NextItem()
|
|
|
|
n := l.NextItem()
|
|
|
|
if e.Typ != n.Typ {
|
|
|
|
if e.Typ != n.Typ {
|
|
|
|
t.Logf("expected Type %s, received %s\n with raw value %q", e.String(), n, n.Val)
|
|
|
|
t.Logf("expected Type %s, received %s with raw value %q", e.String(), n, n.Val)
|
|
|
|
t.Fail()
|
|
|
|
t.Fail()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if e.Val != n.Val {
|
|
|
|
if e.Val != n.Val {
|
|
|
|
t.Logf("expected Value %s, received %s\n with raw value %q", e.String(), n, n.Val)
|
|
|
|
t.Logf("expected Value %s, received %s with raw value %q", e.String(), n, n.Val)
|
|
|
|
t.Fail()
|
|
|
|
t.Fail()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|