harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r395873 - in /incubator/harmony/enhanced/classlib/trunk/modules: archive/make/common/ archive/src/test/java/tests/api/java/util/jar/ nio_char/make/common/ nio_char/src/test/java/tests/api/java/nio/charset/ sql/make/common/ text/make/common/
Date Fri, 21 Apr 2006 13:03:43 GMT
Author: tellison
Date: Fri Apr 21 06:03:40 2006
New Revision: 395873

URL: http://svn.apache.org/viewcvs?rev=395873&view=rev
Log:
Apply patch HARMONY-357 (Enabling a few more tests)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/tests/api/java/util/jar/JarFileTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetEncoderTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetEncoderTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/sql/make/common/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/text/make/common/build.xml

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/build.xml?rev=395873&r1=395872&r2=395873&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/build.xml Fri Apr
21 06:03:40 2006
@@ -96,7 +96,6 @@
             <batchtest todir="${hy.tests.reports}" haltonfailure="no">
                 <fileset dir="${hy.archive.src.test.java}">
                     <include name="**/*Test.java"/>
-                    <exclude name="**/JarFileTest.java"/>
                     <exclude name="**/JarOutputStreamTest.java"/>
                     <exclude name="**/GZIPInputStreamTest.java"/>
                     <exclude name="**/InflaterInputStreamTest.java"/>

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/tests/api/java/util/jar/JarFileTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/tests/api/java/util/jar/JarFileTest.java?rev=395873&r1=395872&r2=395873&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/tests/api/java/util/jar/JarFileTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/tests/api/java/util/jar/JarFileTest.java
Fri Apr 21 06:03:40 2006
@@ -112,9 +112,6 @@
 			fail("Exception during test: " + e.toString());
 		}
 
-		System.out.println("start");
-		System.out.flush();
-
 		try {
 			Support_Resources.copyFile(resources, null, jarName);
 			JarFile jarFile = new JarFile(new File(resources, jarName));
@@ -141,9 +138,6 @@
 		} catch (Exception e) {
 			fail("Exception during entries test: " + e.toString());
 		}
-		System.out.println("finish");
-		System.out.flush();
-
 	}
 
 	/**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/build.xml?rev=395873&r1=395872&r2=395873&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/build.xml Fri Apr
21 06:03:40 2006
@@ -88,6 +88,7 @@
 
             <classpath>
                 <pathelement path="${hy.nio_char.bin.test}"/>
+                <pathelement path="../../../../build/tests" />
             </classpath>
 
             <formatter type="xml" />
@@ -95,30 +96,20 @@
             <batchtest todir="${hy.tests.reports}" haltonfailure="no">
                 <fileset dir="${hy.nio_char.src.test.java}">
                     <include name="**/*Test.java"/>
-                    <exclude name="**/ASCCharsetDecoderTest.java"/>
                     <exclude name="**/ASCCharsetEncoderTest.java"/>
-                    <exclude name="**/CharacterCodingExceptionTest.java"/>
-                    <exclude name="**/CharsetDecoderTest.java"/>
                     <exclude name="**/CharsetEncoderTest.java"/>
                     <exclude name="**/CharsetProviderTest.java"/>
                     <exclude name="**/CharsetTest.java"/>
-                    <exclude name="**/CoderMalfunctionErrorTest.java"/>
+                    <!-- No public constructor? -->
                     <exclude name="**/ConcreteCharsetTest.java"/>
-                    <exclude name="**/GBCharsetDecoderTest.java"/>
                     <exclude name="**/GBCharsetEncoderTest.java"/>
-                    <exclude name="**/ISOCharsetDecoderTest.java"/>
                     <exclude name="**/ISOCharsetEncoderTest.java"/>
                     <exclude name="**/IllegalCharsetNameExceptionTest.java"/>
-                    <exclude name="**/MalformedInputExceptionTest.java"/>
-                    <exclude name="**/UTF16BECharsetDecoderTest.java"/>
                     <exclude name="**/UTF16BECharsetEncoderTest.java"/>
                     <exclude name="**/UTF16CharsetDecoderTest.java"/>
                     <exclude name="**/UTF16CharsetEncoderTest.java"/>
-                    <exclude name="**/UTF16LECharsetDecoderTest.java"/>
                     <exclude name="**/UTF16LECharsetEncoderTest.java"/>
-                    <exclude name="**/UTFCharsetDecoderTest.java"/>
                     <exclude name="**/UTFCharsetEncoderTest.java"/>
-                    <exclude name="**/UnmappableCharacterExceptionTest.java"/>
                     <exclude name="**/UnsupportedCharsetExceptionTest.java"/>
                 </fileset>
             </batchtest>

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetEncoderTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetEncoderTest.java?rev=395873&r1=395872&r2=395873&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetEncoderTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetEncoderTest.java
Fri Apr 21 06:03:40 2006
@@ -66,8 +66,8 @@
 	}
 
 	public void testSpecificDefaultValue() {
-		assertTrue(encoder.averageBytesPerChar() == 1);
-		assertTrue(encoder.maxBytesPerChar() == 1);
+		assertEquals(1.0, encoder.averageBytesPerChar(), 0.0);
+		assertEquals(1.0, encoder.maxBytesPerChar(), 0.0);
 	}
 
 	CharBuffer getMalformedCharBuffer() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java?rev=395873&r1=395872&r2=395873&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java
Fri Apr 21 06:03:40 2006
@@ -98,7 +98,7 @@
 		// normal case
 		CharsetDecoder ec = new MockCharsetDecoder(cs, 1, MAX_BYTES);
 		assertSame(ec.charset(), cs);
-		assertTrue(ec.averageCharsPerByte() == 1);
+		assertEquals(1.0, ec.averageCharsPerByte(), 0.0);
 		assertTrue(ec.maxCharsPerByte() == MAX_BYTES);
 
 		/*
@@ -107,16 +107,17 @@
 		// Normal case: null charset
 		ec = new MockCharsetDecoder(null, 1, MAX_BYTES);
 		assertNull(ec.charset());
-		assertTrue(ec.averageCharsPerByte() == 1);
+		assertEquals(1.0, ec.averageCharsPerByte(), 0.0);
 		assertTrue(ec.maxCharsPerByte() == MAX_BYTES);
 
 		ec = new MockCharsetDecoder(new CharsetEncoderTest.MockCharset("mock",
 				new String[0]), 1, MAX_BYTES);
 
-		// OK: average length less than max length
-		ec = new MockCharsetDecoder(cs, MAX_BYTES, 1);
-		assertTrue(ec.averageCharsPerByte() == MAX_BYTES);
-		assertTrue(ec.maxCharsPerByte() == 1);
+                // Commented out since the comment is wrong since MAX_BYTES > 1
+		// // OK: average length less than max length
+		// ec = new MockCharsetDecoder(cs, MAX_BYTES, 1);
+		// assertTrue(ec.averageCharsPerByte() == MAX_BYTES);
+		// assertTrue(ec.maxCharsPerByte() == 1);
 
 		// Illegal Argument: zero length
 		try {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java?rev=395873&r1=395872&r2=395873&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java
Fri Apr 21 06:03:40 2006
@@ -122,7 +122,7 @@
 		// normal case
 		CharsetEncoder ec = new MockCharsetEncoder(cs, 1, MAX_BYTES);
 		assertSame(ec.charset(), cs);
-		assertTrue(ec.averageBytesPerChar() == 1);
+		assertEquals(1.0, ec.averageBytesPerChar(), 0);
 		assertTrue(ec.maxBytesPerChar() == MAX_BYTES);
 
 		/*
@@ -138,10 +138,11 @@
 		ec = new MockCharsetEncoder(new MockCharset("mock", new String[0]), 1,
 				MAX_BYTES);
 
-		// OK: average length less than max length
-		ec = new MockCharsetEncoder(cs, MAX_BYTES, 1);
-		assertTrue(ec.averageBytesPerChar() == MAX_BYTES);
-		assertTrue(ec.maxBytesPerChar() == 1);
+                // Commented out since the comment is wrong since MAX_BYTES > 1
+		// // OK: average length less than max length
+		// ec = new MockCharsetEncoder(cs, MAX_BYTES, 1);
+		// assertTrue(ec.averageBytesPerChar() == MAX_BYTES);
+		// assertTrue(ec.maxBytesPerChar() == 1);
 
 		// Illegal Argument: zero length
 		try {
@@ -177,7 +178,7 @@
 		// normal case
 		CharsetEncoder ec = new MockCharsetEncoder(cs, 1, MAX_BYTES, ba);
 		assertSame(ec.charset(), cs);
-		assertTrue(ec.averageBytesPerChar() == 1);
+		assertEquals(1.0, ec.averageBytesPerChar(), 0.0);
 		assertTrue(ec.maxBytesPerChar() == MAX_BYTES);
 		assertSame(ba, ec.replacement());
 
@@ -211,10 +212,12 @@
 		} catch (IllegalArgumentException e) {
 		}
 
-		// OK: average length less than max length
-		ec = new MockCharsetEncoder(cs, MAX_BYTES, ba.length, ba);
-		assertTrue(ec.averageBytesPerChar() == MAX_BYTES);
-		assertTrue(ec.maxBytesPerChar() == ba.length);
+                // Commented out since the comment is wrong since MAX_BYTES > 1
+                // This test throws IllegalArgumentException on Harmony and RI
+		// // OK: average length less than max length
+		// ec = new MockCharsetEncoder(cs, MAX_BYTES, ba.length, ba);
+		// assertTrue(ec.averageBytesPerChar() == MAX_BYTES);
+		// assertTrue(ec.maxBytesPerChar() == ba.length);
 
 		// Illegal Argument: zero length
 		try {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java?rev=395873&r1=395872&r2=395873&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java
Fri Apr 21 06:03:40 2006
@@ -113,7 +113,8 @@
 		try {
 			Charset.isSupported("");
 		} catch (IllegalArgumentException e) {
-			fail("Should not throw IllegalArgumentException!");
+                        // FIXME: Commented out since RI does throw IAE
+                        // fail("Should not throw IllegalArgumentException!");
 		}
 	}
 
@@ -229,7 +230,8 @@
 		try {
 			new MockCharset("", new String[0]);
 		} catch (IllegalCharsetNameException e) {
-			fail("Should not throw IllegalArgumentException!");
+                        // FIXME: Commented out since RI does throw IAE
+                        // fail("Should not throw IllegalArgumentException!");
 		}
 	}
 
@@ -319,7 +321,8 @@
 		try {
 			new MockCharset("mockChar", new String[] { "" });
 		} catch (IllegalCharsetNameException e) {
-			fail("Should not throw IllegalArgumentException!");
+                        // FIXME: Commented out since RI does throw IAE
+			// fail("Should not throw IllegalArgumentException!");
 		}
 	}
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetEncoderTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetEncoderTest.java?rev=395873&r1=395872&r2=395873&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetEncoderTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetEncoderTest.java
Fri Apr 21 06:03:40 2006
@@ -67,8 +67,8 @@
 
 	public void testSpecificDefaultValue() {
 		// FIXME: different here!
-		assertTrue(encoder.maxBytesPerChar() == 4);
-		assertTrue(encoder.averageBytesPerChar() == 2.5);
+		assertEquals(4.0, encoder.maxBytesPerChar(), 0.0);
+		assertEquals(2.5, encoder.averageBytesPerChar(), 0.0);
 
 		// assertTrue(encoder.averageBytesPerChar() == 3);
 		// assertTrue(encoder.maxBytesPerChar() == 2);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/sql/make/common/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/make/common/build.xml?rev=395873&r1=395872&r2=395873&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/make/common/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/make/common/build.xml Fri Apr 21
06:03:40 2006
@@ -96,8 +96,9 @@
             <batchtest todir="${hy.tests.reports}" haltonfailure="no">
                 <fileset dir="${hy.sql.src.test.java}">
                     <include name="**/*Test.java"/>
+
+                    <!-- This test is empty -->
                     <exclude name="**/ArrayTest.java" />
-                    <exclude name="**/DriverManagerTest.java" />
                 </fileset>
             </batchtest>
         </junit>

Modified: incubator/harmony/enhanced/classlib/trunk/modules/text/make/common/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/text/make/common/build.xml?rev=395873&r1=395872&r2=395873&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/make/common/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/make/common/build.xml Fri Apr 21
06:03:40 2006
@@ -103,7 +103,6 @@
                     <exclude name="tests/api/java/text/DecimalFormatTest.java"/>
                     <exclude name="**/MessageFormatTest.java"/>
                     <exclude name="**/NumberFormatTest.java"/>
-                    <exclude name="**/SimpleDateFormatTest.java"/>
                 </fileset>
             </batchtest>
         </junit>



Mime
View raw message