mirror of
https://github.com/revanced/smali.git
synced 2025-05-06 17:34:34 +02:00
Improve the error reporting for the lexer tests
This commit is contained in:
parent
94e5a39ad2
commit
2829262f9d
@ -185,8 +185,8 @@ public class LexerTest {
|
|||||||
int expectedTokenType = tokenTypesByName.get(expectedToken.tokenName);
|
int expectedTokenType = tokenTypesByName.get(expectedToken.tokenName);
|
||||||
|
|
||||||
if (token.getType() != expectedTokenType) {
|
if (token.getType() != expectedTokenType) {
|
||||||
Assert.fail(String.format("Invalid token at index %d. Expecting %s, got %s",
|
Assert.fail(String.format("Invalid token at index %d. Expecting %s, got %s(%s)",
|
||||||
expectedTokenIndex-1, expectedToken.tokenName, getTokenName(token.getType())));
|
expectedTokenIndex-1, expectedToken.tokenName, getTokenName(token.getType()), token.getText()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (expectedToken.tokenText != null) {
|
if (expectedToken.tokenText != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user