Extra tests suggested by Clover

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137541 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2003-07-31 22:36:39 +00:00
parent c6bfb25997
commit f62d2f0590
2 changed files with 8 additions and 4 deletions

View File

@ -67,7 +67,7 @@ import org.apache.commons.lang.SerializationUtils;
* Test cases for the {@link Enum} class.
*
* @author Stephen Colebourne
* @version $Id: EnumTest.java,v 1.8 2003/07/30 23:13:09 scolebourne Exp $
* @version $Id: EnumTest.java,v 1.9 2003/07/31 22:36:39 scolebourne Exp $
*/
public final class EnumTest extends TestCase {
@ -119,7 +119,9 @@ public final class EnumTest extends TestCase {
}
public void testToString() {
assertEquals("ColorEnum[Red]", ColorEnum.RED.toString());
String toString = ColorEnum.RED.toString();
assertEquals("ColorEnum[Red]", toString);
assertSame(toString, ColorEnum.RED.toString());
}
public void testIterator() {

View File

@ -67,7 +67,7 @@ import org.apache.commons.lang.SerializationUtils;
* Test cases for the {@link Enum} class.
*
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
* @version $Id: ValuedEnumTest.java,v 1.3 2003/05/22 22:00:06 scolebourne Exp $
* @version $Id: ValuedEnumTest.java,v 1.4 2003/07/31 22:36:39 scolebourne Exp $
*/
public final class ValuedEnumTest extends TestCase {
@ -109,7 +109,9 @@ public final class ValuedEnumTest extends TestCase {
}
public void testToString() {
assertEquals("ValuedColorEnum[Red=1]", ValuedColorEnum.RED.toString());
String toString = ValuedColorEnum.RED.toString();
assertEquals("ValuedColorEnum[Red=1]", toString);
assertSame(toString, ValuedColorEnum.RED.toString());
}
public void testIterator() {