bodewig 01/05/22 02:20:20
Modified: docs/manual/OptionalTasks junit.html
src/testcases/org/apache/tools/ant
IntrospectionHelperTest.java
Log:
Update for JUnit 3.7.
Revision Changes Path
1.5 +2 -2 jakarta-ant/docs/manual/OptionalTasks/junit.html
Index: junit.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/OptionalTasks/junit.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- junit.html 2001/05/04 08:03:49 1.4
+++ junit.html 2001/05/22 09:20:10 1.5
@@ -9,8 +9,8 @@
<p>This task runs tests from the JUnit testing framework. The latest
version of the framework can be found at
<a href="http://www.junit.org">http://www.junit.org</a>.
-This task has been tested with JUnit 3.0 up to JUnit 3.6, it won't
-work with versions before JUnit 3.0.</p>
+This task has been tested with JUnit 3.0 up to JUnit 3.7, it won't
+work with versions prior to JUnit 3.0.</p>
<p>Tests are defined by nested <code>test</code> or
<code>batchtest</code> tags, see <a href="#nested">nested
1.6 +11 -0 jakarta-ant/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java
Index: IntrospectionHelperTest.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- IntrospectionHelperTest.java 2001/01/03 14:18:48 1.5
+++ IntrospectionHelperTest.java 2001/05/22 09:20:17 1.6
@@ -368,6 +368,16 @@
h.put("fourteen", java.lang.StringBuffer.class);
h.put("fifteen", java.lang.Character.TYPE);
h.put("sixteen", java.lang.Character.class);
+
+ /*
+ * JUnit 3.7 adds a getName method to TestCase - so we now
+ * have a name attribute in IntrospectionHelperTest if we run
+ * under JUnit 3.7 but not in earlier versions.
+ *
+ * Simply add it here and remove it after the tests.
+ */
+ h.put("name", java.lang.String.class);
+
IntrospectionHelper ih = IntrospectionHelper.getHelper(getClass());
Enumeration enum = ih.getAttributes();
while (enum.hasMoreElements()) {
@@ -378,6 +388,7 @@
assertEquals("Type of "+name, expect, ih.getAttributeType(name));
h.remove(name);
}
+ h.remove("name");
assert("Found all", h.isEmpty());
}
|