From: Bryan T. <tho...@us...> - 2007-03-20 13:40:38
|
Update of /cvsroot/cweb/junit-ext/src/java/junit/framework In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25865/src/java/junit/framework Modified Files: TestCase2.java Log Message: javadoc comments and modification to reduce logging. Index: TestCase2.java =================================================================== RCS file: /cvsroot/cweb/junit-ext/src/java/junit/framework/TestCase2.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** TestCase2.java 14 Feb 2007 15:53:55 -0000 1.20 --- TestCase2.java 20 Mar 2007 13:40:33 -0000 1.21 *************** *** 707,710 **** --- 707,714 ---- //************************************************************ + /** + * Test helper that can correctly compare arrays of primitives and + * arrays of objects as well as primitives and objects. + */ static public void assertSameValue( Object expected, Object actual ) { *************** *** 720,724 **** * the code to throw {@link AssertionFailedError} instead. */ - static public void assertSameValue( String msg, Object expected, Object actual ) { --- 724,727 ---- *************** *** 878,889 **** Object g = actual.next(); ! if (!expected[i].equals(g)) { /* * Only do message construction if we know that the assert will * fail. */ ! assertTrue(msg + ": Different objects at index=" + i ! + ": expected=" + expected[i] + ", actual=" + g, ! expected[i].equals(g)); } --- 881,894 ---- Object g = actual.next(); ! // if (!expected[i].equals(g)) { ! try { ! assertSameValue(expected[i],g); ! } catch(AssertionFailedError ex) { /* * Only do message construction if we know that the assert will * fail. */ ! fail(msg + ": Different objects at index=" + i + ": expected=" ! + expected[i] + ", actual=" + g); } |