Removed excess data in rune test case

This commit is contained in:
Sasha Koshka 2022-10-04 16:51:53 -04:00
parent 6a72cc9f12
commit c42f4f46fc
2 changed files with 11 additions and 12 deletions

View File

@ -81,8 +81,18 @@ func compareErr (
return
}
_, err = Tokenize(file)
tokens, err := Tokenize(file)
check, isCorrectType := err.(infoerr.Error)
for index, token := range tokens {
test.Log(index, "\tgot token:", token.Describe())
}
if err == nil {
test.Log("no error was recieved, test failed.")
test.Fail()
return
}
test.Log("error that was recieved:")
test.Log(check)
@ -265,15 +275,6 @@ func TestTokenizeErrUnexpectedSymbol (test *testing.T) {
test)
}
func TestTokenizeErrExcessDataRune (test *testing.T) {
compareErr (
"../tests/lexer/error/excessDataRune.arf",
infoerr.ErrorKindError,
"excess data in rune literal",
1, 1, 7,
test)
}
func TestTokenizeErrUnknownEscape (test *testing.T) {
compareErr (
"../tests/lexer/error/unknownEscape.arf",

View File

@ -1,2 +0,0 @@
:arf
'aaaaaaa'