Removed excess data in rune test case
This commit is contained in:
parent
6a72cc9f12
commit
c42f4f46fc
@ -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",
|
||||
|
@ -1,2 +0,0 @@
|
||||
:arf
|
||||
'aaaaaaa'
|
Reference in New Issue
Block a user