Revision: 6658 Author: sco...@google.com Date: Wed Nov 4 11:56:16 2009 Log: Better failure messages for UnitTestTreeLogger on collections.
Patch by: jat Review by: me http://code.google.com/p/google-web-toolkit/source/detail?r=6658 Modified: /trunk/dev/core/src/com/google/gwt/dev/util/UnitTestTreeLogger.java ======================================= --- /trunk/dev/core/src/com/google/gwt/dev/util/UnitTestTreeLogger.java Wed Mar 4 10:40:25 2009 +++ /trunk/dev/core/src/com/google/gwt/dev/util/UnitTestTreeLogger.java Wed Nov 4 11:56:16 2009 @@ -183,23 +183,27 @@ } public void assertCorrectLogEntries() { - Assert.assertEquals("Log lengths do not match", expectedEntries.size(), - actualEntries.size()); + if (expectedEntries.size() != actualEntries.size()) { + Assert.fail("Wrong log count: expected=" + expectedEntries + ", actual=" + actualEntries); + } for (int i = 0, c = expectedEntries.size(); i < c; ++i) { assertCorrectLogEntry(expectedEntries.get(i), actualEntries.get(i)); } } + @Override public TreeLogger branch(Type type, String msg, Throwable caught, HelpInfo helpInfo) { log(type, msg, caught); return this; } + @Override public boolean isLoggable(Type type) { return loggableTypes.contains(type); } + @Override public void log(Type type, String msg, Throwable caught, HelpInfo helpInfo) { if (!isLoggable(type)) { return; --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---