From 2829262f9de8a5e8f0388c22eb9b23f3a844f9ef Mon Sep 17 00:00:00 2001 From: Ben Gruver Date: Sun, 9 Oct 2011 22:52:56 -0400 Subject: [PATCH] Improve the error reporting for the lexer tests --- smali/src/test/java/LexerTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smali/src/test/java/LexerTest.java b/smali/src/test/java/LexerTest.java index ed28280a..5afc2e2c 100644 --- a/smali/src/test/java/LexerTest.java +++ b/smali/src/test/java/LexerTest.java @@ -185,8 +185,8 @@ public class LexerTest { int expectedTokenType = tokenTypesByName.get(expectedToken.tokenName); if (token.getType() != expectedTokenType) { - Assert.fail(String.format("Invalid token at index %d. Expecting %s, got %s", - expectedTokenIndex-1, expectedToken.tokenName, getTokenName(token.getType()))); + Assert.fail(String.format("Invalid token at index %d. Expecting %s, got %s(%s)", + expectedTokenIndex-1, expectedToken.tokenName, getTokenName(token.getType()), token.getText())); } if (expectedToken.tokenText != null) {