remove-rune-literal #8

Merged
sashakoshka merged 6 commits from remove-rune-literal into main 2022-10-05 14:21:43 -06:00
2 changed files with 11 additions and 12 deletions
Showing only changes of commit c42f4f46fc - Show all commits

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'