bodewig 2003/10/22 07:28:14
Modified: src/testcases/org/apache/tools/ant/taskdefs/optional/junit
JUnitVersionHelperTest.java
Log:
Test for PR 23862
Revision Changes Path
1.5 +11 -2
ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelperTest.java
Index: JUnitVersionHelperTest.java
===================================================================
RCS file:
/home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelperTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- JUnitVersionHelperTest.java 7 Mar 2003 11:23:13 -0000 1.4
+++ JUnitVersionHelperTest.java 22 Oct 2003 14:28:14 -0000 1.5
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2002-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -96,6 +96,11 @@
assertEquals("unknown", JUnitVersionHelper.getTestCaseName(null));
}
+ public void testTestCaseSubClass() {
+ assertEquals("overridden getName",
+ JUnitVersionHelper.getTestCaseName(new Foo5()));
+ }
+
public static class Foo implements Test {
public int countTestCases() {return 0;}
public void run(TestResult result) {}
@@ -114,6 +119,10 @@
public static class Foo4 extends Foo {
public String name() {return "I'm a foo, too";}
+ }
+
+ public static class Foo5 extends TestCase {
+ public String getName() {return "overridden getName";}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]