You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2009/07/28 11:30:48 UTC
svn commit: r798469 [25/28] - in /harmony/enhanced/classlib/branches/java6:
./ depends/build/platform/ depends/files/ depends/jars/
depends/manifests/icu4j_4.0/ depends/manifests/icu4j_4.2.1/
depends/manifests/icu4j_4.2.1/META-INF/ make/ modules/access...
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/DoubleTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/DoubleTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/DoubleTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/DoubleTest.java Tue Jul 28 09:30:33 2009
@@ -219,13 +219,17 @@
assertEquals("Created incorrect double", 39089.88888888888888888888888888888888, d
.doubleValue(), 0D);
- // REGRESSION for HARMONY-489
+ // Regression test for HARMONY-489
try {
d = new Double("1E+-20");
fail("new Double(\"1E+-20\") should throw exception");
} catch (NumberFormatException e) {
// expected
}
+
+ // Regression test for HARMONY-329
+ d = Double.parseDouble("-1.233999999999999965116738099630936817275852021384209929081813042837802886790127428328465579708849276001782791006814286802871737087810957327493372866733334925806221045495205250590286471187577636646208155890426896101636282423463443661040209738873506655844025580428394216030152374941053494694642722606658935546875E-112");
+ assertEquals("Failed to parse long string", -1.234E-112D, d.doubleValue(), 0D);
}
/**
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/FloatTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/FloatTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/FloatTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/FloatTest.java Tue Jul 28 09:30:33 2009
@@ -783,6 +783,19 @@
}
/**
+ * @tests java.lang.Float#parseFloat(java.lang.String)
+ */
+ public void test_parseFloat_LString_Harmony6261() {
+ // Regression test for HARMONY-6261
+ float f = new Float("2147483648");
+ assertEquals("2.1474836E9", Float.toString(f));
+
+ doTestCompareRawBits("123456790528.000000000000000f", 0x51e5f4c9, "1.2345679E11");
+ doTestCompareRawBits("8589934592", 0x50000000, "8.5899346E9");
+ doTestCompareRawBits("8606711808", 0x50004000, "8.606712E9");
+ }
+
+ /**
* @tests java.lang.Float#shortValue()
*/
public void test_shortValue() {
@@ -802,6 +815,12 @@
test_toString(12.90898f, "12.90898");
test_toString(1.7014118346046924e+38F, "1.7014118E38");
+
+ test_toString(1E19F, "1.0E19");
+
+ test_toString(1E-36F, "1.0E-36");
+
+ test_toString(1.0E-38F, "1.0E-38");
}
/**
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/MathTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/MathTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/MathTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/MathTest.java Tue Jul 28 09:30:33 2009
@@ -691,6 +691,7 @@
2.0, Math.min(2.0, 1908897.6000089), 0D);
assertEquals("Incorrect double min value", -1908897.6000089, Math.min(-2.0,
-1908897.6000089), 0D);
+ assertEquals("Incorrect double min value", 1.0d, Math.min(1.0d, 1.0d));
// Compare toString representations here since -0.0 = +0.0, and
// NaN != NaN and we need to distinguish
@@ -719,7 +720,8 @@
Math.min(2.0f, 1908897.600f) == 2.0f);
assertTrue("Incorrect float min value",
Math.min(-2.0f, -1908897.600f) == -1908897.600f);
-
+ assertEquals("Incorrect float min value", 1.0f, Math.min(1.0f, 1.0f));
+
// Compare toString representations here since -0.0 = +0.0, and
// NaN != NaN and we need to distinguish
assertEquals("Min failed for NaN",
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/String2Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/String2Test.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/String2Test.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/String2Test.java Tue Jul 28 09:30:33 2009
@@ -321,8 +321,12 @@
* @tests java.lang.String#equals(java.lang.Object)
*/
public void test_equalsLjava_lang_Object() {
- // Test for method boolean java.lang.String.equals(java.lang.Object)
- assertTrue("String not equal", hw1.equals(hw2) && !(hw1.equals(comp11)));
+ assertEquals("String not equal", hw1, hw2);
+ assertEquals("Empty string equals check", "", "");
+ assertEquals("Null string equals check", (String)null, (String)null);
+
+ assertFalse("Unequal strings reports as equal", hw1.equals(comp11));
+ assertFalse("Null string comparison failed", hw1.equals((String)null));
}
/**
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/JarURLConnectionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/JarURLConnectionTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/JarURLConnectionTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/JarURLConnectionTest.java Tue Jul 28 09:30:33 2009
@@ -41,17 +41,18 @@
URLConnection uc;
- private static final URL BASE = JarURLConnectionTest.class.getClassLoader().getResource(".."+File.separatorChar+JarURLConnectionTest.class.getPackage().getName().replace('.', File.separatorChar));
+ private static final String BASE =
+ "file:resources/org/apache/harmony/luni/tests/java/net/lf.jar";
/**
* @tests java.net.JarURLConnection#getAttributes()
*/
public void test_getAttributes() throws Exception{
- URL u = new URL("jar:"
- + BASE.toString()+"/lf.jar!/swt.dll");
- juc = (JarURLConnection) u.openConnection();
- java.util.jar.Attributes a = juc.getJarEntry().getAttributes();
- assertEquals("Returned incorrect Attributes", "SHA MD5", a
+ URL u = new URL("jar:"+BASE+"!/swt.dll");
+
+ juc = (JarURLConnection) u.openConnection();
+ java.util.jar.Attributes a = juc.getJarEntry().getAttributes();
+ assertEquals("Returned incorrect Attributes", "SHA MD5", a
.get(new java.util.jar.Attributes.Name("Digest-Algorithms")));
}
@@ -60,12 +61,11 @@
* @tests java.net.JarURLConnection#getEntryName()
*/
public void test_getEntryName() throws Exception {
- URL u = new URL("jar:"
- + BASE.toString()+"/lf.jar!/plus.bmp");
+ URL u = new URL("jar:"+BASE+"!/plus.bmp");
juc = (JarURLConnection) u.openConnection();
assertEquals("Returned incorrect entryName", "plus.bmp", juc
.getEntryName());
- u = new URL("jar:" + BASE.toString()+"/lf.jar!/");
+ u = new URL("jar:"+BASE+"!/");
juc = (JarURLConnection) u.openConnection();
assertNull("Returned incorrect entryName", juc.getEntryName());
// Regression test for harmony-3053
@@ -77,12 +77,11 @@
* @tests java.net.JarURLConnection#getJarEntry()
*/
public void test_getJarEntry() throws Exception {
- URL u = new URL("jar:"
- + BASE.toString()+"/lf.jar!/plus.bmp");
+ URL u = new URL("jar:"+BASE+"!/plus.bmp");
juc = (JarURLConnection) u.openConnection();
assertEquals("Returned incorrect JarEntry", "plus.bmp", juc
.getJarEntry().getName());
- u = new URL("jar:" + BASE.toString()+"/lf.jar!/");
+ u = new URL("jar:"+BASE+"!/");
juc = (JarURLConnection) u.openConnection();
assertNull("Returned incorrect JarEntry", juc.getJarEntry());
}
@@ -92,8 +91,7 @@
*/
public void test_getJarFile() throws MalformedURLException, IOException {
URL url = null;
- url = new URL("jar:"
- + BASE.toString()+"/lf.jar!/missing");
+ url = new URL("jar:"+BASE+"!/missing");
JarURLConnection connection = null;
connection = (JarURLConnection) url.openConnection();
@@ -123,7 +121,7 @@
assertTrue("file: JarFiles not the same", jf1 == jf2);
jf1.close();
assertTrue("File should exist", file.exists());
- new URL("jar:" + BASE.toString()+"/lf.jar!/");
+ new URL("jar:"+BASE+"!/");
con1 = (JarURLConnection) fUrl1.openConnection();
jf1 = con1.getJarFile();
con2 = (JarURLConnection) fUrl1.openConnection();
@@ -184,12 +182,12 @@
* @tests java.net.JarURLConnection#getJarFileURL()
*/
public void test_getJarFileURL() throws Exception {
- URL fileURL = new URL(BASE.toString()+"/lf.jar");
- URL u = new URL("jar:"
- + BASE.toString()+"/lf.jar!/plus.bmp");
+ URL fileURL = new URL(BASE);
+ URL u = new URL("jar:"+BASE+"!/plus.bmp");
juc = (JarURLConnection) u.openConnection();
- assertTrue("Returned incorrect file URL", juc.getJarFileURL().equals(
- fileURL));
+ assertEquals("Returned incorrect file URL",
+ fileURL, juc.getJarFileURL());
+
// Regression test for harmony-3053
URL url = new URL("jar:file:///bar.jar!/foo.jar!/Bugs/HelloWorld.class");
assertEquals("file:/bar.jar",((JarURLConnection)url.openConnection()).getJarFileURL().toString());
@@ -199,8 +197,7 @@
* @tests java.net.JarURLConnection#getMainAttributes()
*/
public void test_getMainAttributes() throws Exception{
- URL u = new URL("jar:"
- + BASE.toString()+"/lf.jar!/swt.dll");
+ URL u = new URL("jar:"+BASE+"!/swt.dll");
juc = (JarURLConnection) u.openConnection();
java.util.jar.Attributes a = juc.getMainAttributes();
assertEquals("Returned incorrect Attributes", "1.0", a
@@ -235,7 +232,7 @@
* @tests java.net.JarURLConnection#getManifest()
*/
public void test_getManifest() throws Exception {
- URL u = new URL("jar:" + BASE.toString() + "/lf.jar!/plus.bmp");
+ URL u = new URL("jar:" + BASE + "!/plus.bmp");
juc = (JarURLConnection) u.openConnection();
Manifest mf = juc.getManifest();
assertNotNull(mf);
@@ -250,8 +247,7 @@
* @tests java.net.JarURLConnection#getCertificates()
*/
public void test_getCertificates() throws Exception {
- URL u = new URL("jar:"
- + BASE.toString()+"/lf.jar!/plus.bmp");
+ URL u = new URL("jar:"+BASE+"!/plus.bmp");
juc = (JarURLConnection) u.openConnection();
// read incomplete, shall return null
assertNull(juc.getCertificates());
@@ -264,7 +260,7 @@
// still return null for this type of file
assertNull(juc.getCertificates());
- URL fileURL = new URL("jar:" + BASE.toString()+"/lf.jar!/");
+ URL fileURL = new URL("jar:"+BASE+"!/");
juc = (JarURLConnection)fileURL.openConnection();
is = juc.getJarFileURL().openStream();
while(is.read(buf)>0);
@@ -278,14 +274,12 @@
*/
public void test_getContentLength() throws Exception {
// check length for jar file itself
- URL u = new URL("jar:"
- + BASE.toString()+"/lf.jar!/");
+ URL u = new URL("jar:"+BASE+"!/");
assertEquals("Returned incorrect size for jar file", 33095,
u.openConnection().getContentLength());
// check length for jar entry
- u = new URL("jar:"
- + BASE.toString()+"/lf.jar!/plus.bmp");
+ u = new URL("jar:"+BASE+"!/plus.bmp");
assertEquals("Returned incorrect size for the entry", 190,
u.openConnection().getContentLength());
}
@@ -296,20 +290,17 @@
*/
public void test_getContentType() throws Exception {
// check type for jar file itself
- URL u = new URL("jar:"
- + BASE.toString()+"/lf.jar!/");
+ URL u = new URL("jar:"+BASE+"!/");
assertEquals("Returned incorrect type for jar file", "x-java/jar",
u.openConnection().getContentType());
// check type for jar entry with known type
- u = new URL("jar:"
- + BASE.toString()+"/lf.jar!/plus.bmp");
+ u = new URL("jar:"+BASE+"!/plus.bmp");
assertEquals("Returned incorrect type for the entry with known type",
"image/bmp", u.openConnection().getContentType());
// check type for jar entry with unknown type
- u = new URL("jar:"
- + BASE.toString()+"/lf.jar!/Manifest.mf");
+ u = new URL("jar:"+BASE+"!/Manifest.mf");
assertEquals("Returned incorrect type for the entry with known type",
"content/unknown", u.openConnection().getContentType());
}
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java Tue Jul 28 09:30:33 2009
@@ -545,7 +545,7 @@
// Regression for HARMONY-946
ServerSocket ss = new ServerSocket(0);
- Socket s = new Socket("0.0.0.0 ", ss.getLocalPort());
+ Socket s = new Socket("0.0.0.0", ss.getLocalPort());
ss.close();
s.close();
}
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLClassLoaderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLClassLoaderTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLClassLoaderTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLClassLoaderTest.java Tue Jul 28 09:30:33 2009
@@ -44,7 +44,7 @@
private static final String PREFIX = "http://localhost:";
- private static final String ROOT = "../../support/src/test/resources/net.resources/HTTP/html/testres231";
+ private static final String ROOT = "resources/net.resources/HTTP/html/testres231";
private static String serverURL = null;
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLTest.java Tue Jul 28 09:30:33 2009
@@ -808,7 +808,7 @@
assertTrue("openStream succeeded for non existent resource", exception);
int port = Support_Jetty
- .startHttpServerWithDocRoot("./src/test/resources/org/apache/harmony/luni/tests/java/net/");
+ .startHttpServerWithDocRoot("resources/org/apache/harmony/luni/tests/java/net/");
URL u = new URL("jar:" + "http://localhost:" + port
+ "/lf.jar!/plus.bmp");
InputStream in = u.openStream();
@@ -1234,7 +1234,6 @@
String ref = "?y";
URL url = new URL(new URL(strURL), ref);
assertEquals("http://a/b/c/?y", url.toExternalForm());
-
}
// Regression test for HARMONY-6254
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/CurrencyTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/CurrencyTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/CurrencyTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/CurrencyTest.java Tue Jul 28 09:30:33 2009
@@ -121,13 +121,13 @@
Locale.setDefault(Locale.US);
assertEquals("currK.getSymbol()", "\u20a9", currK.getSymbol());
// Some non-bug differences below because of CLDR data.
- assertEquals("currI.getSymbol()", "\u20a8", currI
+ assertEquals("currI.getSymbol()", "Rs", currI
.getSymbol());
assertEquals("currUS.getSymbol()", "$", currUS.getSymbol());
Locale.setDefault(new Locale("ko", "KR"));
- assertEquals("currK.getSymbol()", "\uffe6", currK.getSymbol());
- assertEquals("currI.getSymbol()", "0\u2264Rs.|1\u2264Re.|1<Rs.", currI
+ assertEquals("currK.getSymbol()", "\u20a9", currK.getSymbol());
+ assertEquals("currI.getSymbol()", "Rs", currI
.getSymbol());
assertEquals("currUS.getSymbol()", "US$", currUS.getSymbol());
@@ -135,8 +135,8 @@
// one with Korean country but an India language
// this method should return the currency codes in that case
Locale.setDefault(new Locale("kr", "KR"));
- assertEquals("currK.getSymbol()", "KRW", currK.getSymbol());
- assertEquals("currI.getSymbol()", "0#Rs.|1#Re.|1<Rs.", currI
+ assertEquals("currK.getSymbol()", "\u20a9", currK.getSymbol());
+ assertEquals("currI.getSymbol()", "Rs", currI
.getSymbol());
assertEquals("currUS.getSymbol()", "US$", currUS.getSymbol());
}
@@ -161,7 +161,7 @@
assertEquals("JPY", currJ.getSymbol(Locale.FRENCH));
Currency currUS = Currency.getInstance("USD");
- assertEquals("US$", currUS.getSymbol(Locale.JAPAN));
+ assertEquals("$", currUS.getSymbol(Locale.JAPAN));
Locale.setDefault(new Locale("ja", "JP"));
assertEquals("JP\u00a5", currJ.getSymbol(new Locale("", "JP")));
@@ -185,20 +185,20 @@
assertEquals("US$", currUS.getSymbol(new Locale("", "US")));
Currency currCA = Currency.getInstance("CAD");
- assertEquals("CAD", currCA.getSymbol(Locale.JAPAN));
+ assertEquals("CA$", currCA.getSymbol(Locale.JAPAN));
assertEquals("CAD", currCA.getSymbol(Locale.JAPANESE));
- assertEquals("$Ca", currCA.getSymbol(Locale.FRANCE));
+ assertEquals("$CA", currCA.getSymbol(Locale.FRANCE));
assertEquals("CAD", currCA.getSymbol(Locale.FRENCH));
assertEquals("CA$", currCA.getSymbol(Locale.US));
assertEquals("CAD", currCA.getSymbol(Locale.ENGLISH));
- assertEquals("Can$", currCA.getSymbol(new Locale("es", "US")));
+ assertEquals("CA$", currCA.getSymbol(new Locale("es", "US")));
assertEquals("CA$", currCA.getSymbol(new Locale("en", "US")));
assertEquals("$", currCA.getSymbol(Locale.CANADA));
assertEquals("$", currCA.getSymbol(Locale.CANADA_FRENCH));
assertEquals("$", currCA.getSymbol(new Locale("en", "CA")));
assertEquals("$", currCA.getSymbol(new Locale("fr", "CA")));
- assertEquals("CAD", currCA.getSymbol(new Locale("", "CA")));
+ assertEquals("CA$", currCA.getSymbol(new Locale("", "CA")));
// tests what happens with improper locales, i.e. countries without the
// given language
@@ -206,13 +206,13 @@
currUS.getSymbol(new Locale("ar", "US")));
assertEquals("currUS.getSymbol(new Locale(\"ar\", \"CA\"))", "US$",
currUS.getSymbol(new Locale("ar", "CA")));
- assertEquals("currCA.getSymbol(new Locale(\"ar\", \"US\"))", "CAD",
+ assertEquals("currCA.getSymbol(new Locale(\"ar\", \"US\"))", "CA$",
currCA.getSymbol(new Locale("ar", "US")));
- assertEquals("currCA.getSymbol(new Locale(\"ar\", \"CA\"))", "CAD",
+ assertEquals("currCA.getSymbol(new Locale(\"ar\", \"CA\"))", "CA$",
currCA.getSymbol(new Locale("ar", "CA")));
assertEquals("currJ.getSymbol(new Locale(\"ja\", \"US\"))", "\uffe5",
currJ.getSymbol(new Locale("ja", "US")));
- assertEquals("currUS.getSymbol(new Locale(\"ja\", \"US\"))", "US$",
+ assertEquals("currUS.getSymbol(new Locale(\"ja\", \"US\"))", "$",
currUS.getSymbol(new Locale("ja", "US")));
// cross testing between USD and JPY when locale is JAPANESE JAPAN
@@ -264,9 +264,9 @@
// bogus Locales , when default locale is Locale_ja_JP
assertEquals("US$", currUS2.getSymbol(new Locale("ar", "JP")));
assertEquals("US$", currUS2.getSymbol(new Locale("ar", "US")));
- assertEquals("US$", currUS2.getSymbol(new Locale("ja", "AE")));
+ assertEquals("$", currUS2.getSymbol(new Locale("ja", "AE")));
assertEquals("$", currUS2.getSymbol(new Locale("en", "AE")));
- assertEquals("currUS.getSymbol(new Locale(\"ja\", \"US\"))", "US$",
+ assertEquals("currUS.getSymbol(new Locale(\"ja\", \"US\"))", "$",
currUS.getSymbol(new Locale("ja", "US")));
Locale.setDefault(Locale.US);
@@ -280,7 +280,7 @@
assertEquals("DKK", currDKK.getSymbol(new Locale("da", "")));
assertEquals("\u20ac", currE.getSymbol(new Locale("", "DK")));
- assertEquals("DKK", currDKK.getSymbol(new Locale("", "DK")));
+ assertEquals("Dkr", currDKK.getSymbol(new Locale("", "DK")));
Locale.setDefault(new Locale("da", "DK"));
assertEquals("\u20ac", currE.getSymbol(new Locale("da", "DK")));
@@ -290,10 +290,10 @@
assertEquals("DKK", currDKK.getSymbol(new Locale("da", "")));
assertEquals("\u20ac", currE.getSymbol(new Locale("", "DK")));
- assertEquals("DKK", currDKK.getSymbol(new Locale("", "DK")));
+ assertEquals("Dkr", currDKK.getSymbol(new Locale("", "DK")));
assertEquals("\u20ac", currE.getSymbol(new Locale("ar", "AE")));
- assertEquals("DKK", currDKK.getSymbol(new Locale("ar", "AE")));
+ assertEquals("Dkr", currDKK.getSymbol(new Locale("ar", "AE")));
}
/**
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/GregorianCalendarTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/GregorianCalendarTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/GregorianCalendarTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/GregorianCalendarTest.java Tue Jul 28 09:30:33 2009
@@ -678,12 +678,12 @@
GregorianCalendar g = new GregorianCalendar(TimeZone
.getTimeZone("Europe/London"), new Locale("en", "GB"));
int minimalDaysInFirstWeek = g.getMinimalDaysInFirstWeek();
- assertEquals(1, minimalDaysInFirstWeek);
+ assertEquals(4, minimalDaysInFirstWeek);
g = new GregorianCalendar(TimeZone.getTimeZone("Europe/London"),
new Locale("fr"));
minimalDaysInFirstWeek = g.getMinimalDaysInFirstWeek();
- assertEquals(1, minimalDaysInFirstWeek);
+ assertEquals(4, minimalDaysInFirstWeek);
g = new GregorianCalendar(TimeZone.getTimeZone("Europe/London"),
new Locale("fr", "CA"));
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/HashMapTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/HashMapTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/HashMapTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/HashMapTest.java Tue Jul 28 09:30:33 2009
@@ -336,17 +336,47 @@
k.setKey(17);
assertNull(map.get(k));
-
+ }
+
+ /**
+ * Tests for proxy object keys and values
+ */
+ public void test_proxies() {
// Regression for HARMONY-6237
- MockInterface proxyInstance = (MockInterface) Proxy.newProxyInstance(
+ MockInterface proxyKey = (MockInterface) Proxy.newProxyInstance(
+ MockInterface.class.getClassLoader(),
+ new Class[] { MockInterface.class }, new MockHandler(
+ new MockClass()));
+ MockInterface proxyValue = (MockInterface) Proxy.newProxyInstance(
MockInterface.class.getClassLoader(),
new Class[] { MockInterface.class }, new MockHandler(
new MockClass()));
- hm.put(proxyInstance, "value2");
-
- assertEquals("Failed with proxy object key", "value2", hm
- .get(proxyInstance));
+ // Proxy key
+ Object val = new Object();
+ hm.put(proxyKey, val);
+
+ assertEquals("Failed with proxy object key", val, hm
+ .get(proxyKey));
+ assertTrue("Failed to find proxy key", hm.containsKey(proxyKey));
+ assertEquals("Failed to remove proxy object key", val,
+ hm.remove(proxyKey));
+ assertFalse("Should not have found proxy key", hm.containsKey(proxyKey));
+
+ // Proxy value
+ Object k = new Object();
+ hm.put(k, proxyValue);
+
+ assertTrue("Failed to find proxy object as value", hm.containsValue(proxyValue));
+
+ // Proxy key and value
+ HashMap map = new HashMap();
+ map.put(proxyKey, proxyValue);
+ assertTrue("Failed to find proxy key", map.containsKey(proxyKey));
+ assertEquals(1, map.size());
+ Object[] entries = map.entrySet().toArray();
+ Map.Entry entry = (Map.Entry)entries[0];
+ assertTrue("Failed to find proxy association", map.entrySet().contains(entry));
}
/**
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/TimerTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/TimerTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/TimerTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/TimerTest.java Tue Jul 28 09:30:33 2009
@@ -189,6 +189,22 @@
}
}
+ public void testConstructorThrowsException() {
+ try {
+ new Timer(null, true);
+ fail("NullPointerException expected");
+ } catch (NullPointerException e) {
+ //expected
+ }
+
+ try {
+ new Timer(null, false);
+ fail("NullPointerException expected");
+ } catch (NullPointerException e) {
+ //expected
+ }
+ }
+
/**
* @tests java.util.Timer#cancel()
*/
Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/resources/net.resources/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Jul 28 09:30:33 2009
@@ -0,0 +1 @@
+/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/net.resources:790472-798021
Modified: harmony/enhanced/classlib/branches/java6/modules/math/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/math/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/math/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/math/build.xml Tue Jul 28 09:30:33 2009
@@ -19,27 +19,11 @@
<project name="MATH Build" default="build" basedir=".">
<description>Build for MATH component</description>
- <!-- import common properties -->
+ <property name="hy.module" value="math" />
<property name="hy.hdk" location="${basedir}/../../deploy" />
<import file="${hy.hdk}/build/ant/properties.xml" />
- <property name="tests.output" location="../../build/test_report" />
-
- <!-- set global properties for this build. -->
- <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
-
- <fileset id="classes" dir="${hy.build}">
- <or>
- <present targetdir="${hy.math.src.main.java}" />
- <present targetdir="${hy.math.src.main.java}">
- <mapper type="regexp"
- from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
- to="\1.java"/>
- </present>
- </or>
- </fileset>
-
- <property name="math.exclude.file" location="${hy.hdk}/build/math.exclude" />
+ <property file="../../make/depends.properties" />
<target name="build" depends="compile-java, copy-resources, build-jar" />
@@ -55,11 +39,12 @@
</target>
<!-- internal target for local and global test run sequence -->
- <target name="-test-module" depends="build, compile-tests, prepare-exclude, run-tests" />
+ <target name="-test-module" depends="build, run-tests" />
<target name="clean">
<delete file="${hy.jdk}/jre/lib/boot/math.jar" />
<delete file="${hy.jdk}/jre/lib/boot/math-src.jar" />
+ <delete dir="${tests.hdk.dir}" failonerror="false" />
<delete failonerror="false">
<fileset refid="classes" />
</delete>
@@ -69,11 +54,11 @@
<target name="compile-java">
<echo message="Compiling MATH classes" />
- <mkdir dir="${hy.build}" />
+ <mkdir dir="../../build/classes" />
<javac sourcepath=""
- srcdir="${hy.math.src.main.java}"
- destdir="${hy.build}"
+ srcdir="src/main/java"
+ destdir="../../build/classes"
compiler="${hy.javac.compiler}"
memoryMaximumSize="${hy.javac.maxmem}"
source="${hy.javac.source}"
@@ -91,9 +76,9 @@
</target>
<target name="copy-resources">
- <mkdir dir="${hy.build}" />
- <copy todir="${hy.build}" includeemptydirs="false">
- <fileset dir="${hy.math.src.main.java}">
+ <mkdir dir="../../build/classes" />
+ <copy todir="../../build/classes" includeemptydirs="false">
+ <fileset dir="src/main/java">
<exclude name="**/*.java" />
</fileset>
</copy>
@@ -101,7 +86,7 @@
<target name="build-jar" depends="svn-info">
<jar destfile="${hy.jdk}/jre/lib/boot/math.jar"
- manifest="${hy.math}/META-INF/MANIFEST.MF"
+ manifest="META-INF/MANIFEST.MF"
compress="${hy.jar.compress}">
<fileset refid="classes" />
<manifest>
@@ -112,7 +97,7 @@
</jar>
<jar destfile="${hy.jdk}/jre/lib/boot/math-src.jar">
- <fileset dir="${hy.math.src.main.java}" />
+ <fileset dir="src/main/java" />
<manifest>
<attribute name="Implementation-Version" value="${svn.info}"/>
</manifest>
@@ -121,88 +106,44 @@
</jar>
</target>
- <target name="compile-tests">
- <echo message="Compiling MATH tests" />
-
- <mkdir dir="${hy.math.bin.test}" />
-
- <javac srcdir="${hy.math.src.test.java}"
- destdir="${hy.math.bin.test}"
- sourcepath=""
- compiler="${hy.javac.compiler}"
- memoryMaximumSize="${hy.javac.maxmem}"
- source="${hy.javac.source}"
- target="${hy.javac.target}"
- debug="${hy.javac.debug}">
-
- <compilerarg line="${build.compilerarg}" />
-
- <bootclasspath>
- <fileset dir="${hy.jdk}/jre/lib/boot">
- <include name="**/*.jar" />
- </fileset>
- </bootclasspath>
- <classpath location="../../build/tests" />
- </javac>
- </target>
-
- <target name="prepare-exclude">
- <prepare-exclude-list moduleName="math" dir="./make"
- result="${math.exclude.file}"/>
- </target>
-
- <target name="run-tests">
-
- <mkdir dir="${tests.output}" />
-
- <property name="test.jre.home" value="${hy.jdk}/jre" />
-
- <junit fork="yes"
- forkmode="${hy.test.forkmode}"
- timeout="${hy.test.timeout}"
- printsummary="withOutAndErr"
- errorproperty="test.errors"
- failureproperty="test.failures"
- showoutput="on"
- dir="${basedir}"
- jvm="${test.jre.home}/bin/java">
-
- <assertions enableSystemAssertions="true">
- <enable />
- </assertions>
-
- <jvmarg line="${hy.test.vmargs}" />
-
- <classpath>
- <pathelement path="${hy.math.bin.test}"/>
- </classpath>
- <classpath location="../../build/tests" />
-
- <formatter type="xml" />
-
- <batchtest todir="${tests.output}" haltonfailure="no" >
+ <target name="test-jar" depends="svn-info,compile-tests">
+ <mkdir dir="${tests.hdk.dir}" />
+
+ <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+
+ <jar destfile="${tests.hdk.dir}/math_tests.jar">
+ <fileset dir="bin/test" />
+ <manifest>
+ <attribute name="Implementation-Version" value="${svn.info}"/>
+ </manifest>
+ <metainf refid="hy.required.metainf-files"/>
+ </jar>
- <fileset dir="${hy.math.src.test.java}">
- <!-- if ${test.case} -->
- <include name="${converted.tc}" if="test.case" />
- <!-- unless ${test.case} -->
- <include name="**/*Test.java" unless="test.case" />
- <excludesfile name="${math.exclude.file}" unless="test.case" />
- </fileset>
- </batchtest>
- </junit>
- <antcall target="touch-failures-file" />
- <antcall target="touch-errors-file" />
+ <mkdir dir="${tests.excludes.hdk.dir}"/>
+ <copy todir="${tests.excludes.hdk.dir}">
+ <fileset dir="make" includes="exclude*"/>
+ <filterchain>
+ <tokenfilter>
+ <replaceregex pattern="\.java" replace="\.class" flags="g"/>
+ </tokenfilter>
+ </filterchain>
+ </copy>
+
+ <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
</target>
- <target name="touch-failures-file" if="test.failures">
- <echo file="${tests.output}/test.failures"
- append="true">math${line.separator}</echo>
+ <target name="compile-tests">
+ <compile-tests description="math tests">
+ <javac-elements>
+ <src>
+ <pathelement location="src/test/java" />
+ </src>
+ </javac-elements>
+ </compile-tests>
</target>
- <target name="touch-errors-file" if="test.errors">
- <echo file="${tests.output}/test.errors"
- append="true">math${line.separator}</echo>
+ <target name="run-tests" depends="test-jar">
+ <ant dir="${tests.hdk.dir}" target="test-module" />
</target>
</project>
Modified: harmony/enhanced/classlib/branches/java6/modules/misc/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/misc/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/misc/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/misc/build.xml Tue Jul 28 09:30:33 2009
@@ -19,30 +19,12 @@
<project name="MISC Build" default="build" basedir=".">
<description>Build for MISC component</description>
- <!-- import common properties -->
+ <property name="hy.module" value="misc" />
<property name="hy.hdk" location="${basedir}/../../deploy" />
<import file="${hy.hdk}/build/ant/properties.xml" />
- <property name="tests.output" location="../../build/test_report" />
-
- <!-- set global properties for this build. -->
- <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
-
- <fileset id="classes" dir="${hy.build}">
- <or>
- <present targetdir="${hy.misc.src.main.java}" />
- <present targetdir="${hy.misc.src.main.java}">
- <mapper type="regexp"
- from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
- to="\1.java"/>
- </present>
- </or>
- </fileset>
-
<property file="../../make/depends.properties" />
- <property name="misc.exclude.file" location="${hy.hdk}/build/misc.exclude" />
-
<target name="build" depends="compile-java, copy-resources, build-jar" />
<target name="test" depends="-test-module">
@@ -57,11 +39,12 @@
</target>
<!-- internal target for local and global test run sequence -->
- <target name="-test-module" depends="build, compile-tests, prepare-exclude, run-tests" />
+ <target name="-test-module" depends="build, run-tests" />
<target name="clean">
- <delete file="${hy.jdk}/jre/lib/boot/${hy.misc.packaging.jarname}.jar" />
- <delete file="${hy.jdk}/jre/lib/boot/${hy.misc.packaging.jarname}-src.jar" />
+ <delete file="${hy.jdk}/jre/lib/boot/misc.jar" />
+ <delete file="${hy.jdk}/jre/lib/boot/misc-src.jar" />
+ <delete dir="${tests.hdk.dir}" failonerror="false" />
<delete failonerror="false">
<fileset refid="classes" />
</delete>
@@ -71,11 +54,11 @@
<target name="compile-java">
<echo message="Compiling MISC classes" />
- <mkdir dir="${hy.build}" />
+ <mkdir dir="../../build/classes" />
<javac sourcepath=""
- srcdir="${hy.misc.src.main.java}"
- destdir="${hy.build}"
+ srcdir="src/main/java"
+ destdir="../../build/classes"
compiler="${hy.javac.compiler}"
memoryMaximumSize="${hy.javac.maxmem}"
source="${hy.javac.source}"
@@ -93,17 +76,17 @@
</target>
<target name="copy-resources">
- <mkdir dir="${hy.build}" />
- <copy todir="${hy.build}" includeemptydirs="false">
- <fileset dir="${hy.misc.src.main.java}">
+ <mkdir dir="../../build/classes" />
+ <copy todir="../../build/classes" includeemptydirs="false">
+ <fileset dir="src/main/java">
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="build-jar" depends="svn-info">
- <jar destfile="${hy.jdk}/jre/lib/boot/${hy.misc.packaging.jarname}.jar"
- manifest="${hy.misc}/META-INF/MANIFEST.MF"
+ <jar destfile="${hy.jdk}/jre/lib/boot/misc.jar"
+ manifest="META-INF/MANIFEST.MF"
compress="${hy.jar.compress}">
<fileset refid="classes" />
<manifest>
@@ -113,8 +96,8 @@
<metainf refid="hy.required.metainf-files"/>
</jar>
- <jar destfile="${hy.jdk}/jre/lib/boot/${hy.misc.packaging.jarname}-src.jar">
- <fileset dir="${hy.misc.src.main.java}" />
+ <jar destfile="${hy.jdk}/jre/lib/boot/misc-src.jar">
+ <fileset dir="src/main/java" />
<manifest>
<attribute name="Implementation-Version" value="${svn.info}"/>
</manifest>
@@ -125,11 +108,11 @@
<target name="build-native" depends="build-native-all" />
<target name="build-native-all" >
- <make dir="${hy.misc.src.main.native}/accessors/${hy.os.family}" />
+ <make dir="src/main/native/accessors/${hy.os.family}" />
<!-- Copy the built shared libs over to the jre/bin dir -->
<copy todir="${hy.jdk}/jre/bin" overwrite="yes">
- <fileset dir="${hy.misc.src.main.native}/accessors">
+ <fileset dir="src/main/native/accessors">
<include name="*${shlib.suffix}*"/>
<include name="*${progdb.suffix}*" if="is.windows" />
<exclude name="*${manifest.suffix}"/>
@@ -137,7 +120,7 @@
</copy>
<!-- Copy link exports file on z/OS -->
<copy todir="${hy.hdk}/lib" overwrite="yes">
- <fileset dir="${hy.misc.src.main.native}/accessors/${hy.os.family}">
+ <fileset dir="src/main/native/accessors/${hy.os.family}">
<include name="*${linklib.suffix}" if="is.zos" />
</fileset>
</copy>
@@ -145,91 +128,48 @@
<!-- Clean natives -->
<target name="clean-native">
- <make dir="${hy.misc.src.main.native}/accessors/${hy.os.family}"
+ <make dir="src/main/native/accessors/${hy.os.family}"
target="clean" />
</target>
- <target name="compile-tests">
- <echo message="Compiling MISC tests" />
-
- <mkdir dir="${hy.misc.bin.test}" />
-
- <javac srcdir="${hy.misc.src.test.java}"
- destdir="${hy.misc.bin.test}"
- sourcepath=""
- compiler="${hy.javac.compiler}"
- memoryMaximumSize="${hy.javac.maxmem}"
- source="${hy.javac.source}"
- target="${hy.javac.target}"
- debug="${hy.javac.debug}">
-
- <compilerarg line="${build.compilerarg}" />
+ <target name="test-jar" depends="svn-info,compile-tests">
+ <mkdir dir="${tests.hdk.dir}" />
+
+ <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+
+ <jar destfile="${tests.hdk.dir}/misc_tests.jar">
+ <fileset dir="bin/test" />
+ <manifest>
+ <attribute name="Implementation-Version" value="${svn.info}"/>
+ </manifest>
+ <metainf refid="hy.required.metainf-files"/>
+ </jar>
- <bootclasspath>
- <fileset dir="${hy.jdk}/jre/lib/boot">
- <include name="**/*.jar" />
- </fileset>
- </bootclasspath>
- <classpath location="../../build/tests" />
- </javac>
- </target>
+ <mkdir dir="${tests.excludes.hdk.dir}"/>
+ <copy todir="${tests.excludes.hdk.dir}">
+ <fileset dir="make" includes="exclude*"/>
+ <filterchain>
+ <tokenfilter>
+ <replaceregex pattern="\.java" replace="\.class" flags="g"/>
+ </tokenfilter>
+ </filterchain>
+ </copy>
- <target name="prepare-exclude">
- <prepare-exclude-list moduleName="misc" dir="./make"
- result="${misc.exclude.file}"/>
- </target>
-
- <target name="run-tests">
- <mkdir dir="${tests.output}" />
-
- <property name="test.jre.home" value="${hy.jdk}/jre" />
- <junit fork="yes"
- forkmode="${hy.test.forkmode}"
- timeout="${hy.test.timeout}"
- printsummary="withOutAndErr"
- errorproperty="test.errors"
- failureproperty="test.failures"
- showoutput="on"
- dir="${basedir}"
- jvm="${test.jre.home}/bin/java">
-
- <assertions enableSystemAssertions="true">
- <enable />
- </assertions>
-
- <jvmarg line="${hy.test.vmargs}" />
-
- <jvmarg value="-Xbootclasspath/a:${hy.misc.bin.test}${path.separator}${basedir}/../../${junit.jar}"/>
-
- <classpath>
- <pathelement path="${hy.misc.bin.test}"/>
- </classpath>
-
- <formatter type="xml" />
-
- <batchtest todir="${tests.output}" haltonfailure="no" >
-
- <fileset dir="${hy.misc.src.test.java}">
- <!-- if ${test.case} -->
- <include name="${converted.tc}" if="test.case" />
- <!-- unless ${test.case} -->
- <include name="**/*Test.java" unless="test.case" />
- <excludesfile name="${misc.exclude.file}" unless="test.case" />
- </fileset>
- </batchtest>
- </junit>
- <antcall target="touch-failures-file" />
- <antcall target="touch-errors-file" />
+ <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
</target>
- <target name="touch-failures-file" if="test.failures">
- <echo file="${tests.output}/test.failures"
- append="true">misc${line.separator}</echo>
+ <target name="compile-tests">
+ <compile-tests description="misc tests">
+ <javac-elements>
+ <src>
+ <pathelement location="src/test/java/common" />
+ </src>
+ </javac-elements>
+ </compile-tests>
</target>
- <target name="touch-errors-file" if="test.errors">
- <echo file="${tests.output}/test.errors"
- append="true">misc${line.separator}</echo>
+ <target name="run-tests" depends="test-jar">
+ <ant dir="${tests.hdk.dir}" target="test-module" />
</target>
</project>
Modified: harmony/enhanced/classlib/branches/java6/modules/nio/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio/build.xml Tue Jul 28 09:30:33 2009
@@ -19,39 +19,11 @@
<project name="NIO Build" default="build" basedir=".">
<description>Build for NIO component</description>
- <!-- import common properties -->
+ <property name="hy.module" value="nio" />
<property name="hy.hdk" location="${basedir}/../../deploy" />
<import file="${hy.hdk}/build/ant/properties.xml" />
- <property name="tests.output" location="../../build/test_report" />
-
- <!-- set global properties for this build. -->
- <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
-
- <property name="hy.nio.src.main.java.platform"
- value="${hy.nio.src.main.java}/../${hy.os.family}" />
-
- <property name="hy.nio.src.test.java.platform"
- value="${hy.nio.src.test.java}/../${hy.os.family}" />
-
- <property name="nio.exclude.file" location="${hy.hdk}/build/nio.exclude" />
-
- <fileset id="classes" dir="${hy.build}">
- <or>
- <present targetdir="${hy.nio.src.main.java}" />
- <present targetdir="${hy.nio.src.main.java}">
- <mapper type="regexp"
- from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
- to="\1.java" />
- </present>
- <present targetdir="${hy.nio.src.main.java.platform}" />
- <present targetdir="${hy.nio.src.main.java.platform}">
- <mapper type="regexp"
- from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
- to="\1.java" />
- </present>
- </or>
- </fileset>
+ <property file="../../make/depends.properties" />
<target name="build" depends="compile-java, copy-resources, build-jar" />
@@ -67,17 +39,16 @@
</target>
<!-- internal target for local and global test run sequence -->
- <target name="-test-module"
- depends="build, compile-tests, prepare-exclude, run-tests" />
+ <target name="-test-module" depends="build, run-tests" />
<!-- Build natives.-->
<target name="build-native" depends="build-native-all" />
<target name="build-native-all" >
- <make dir="${hy.nio.src.main.native}/nio/${hy.os.family}" />
+ <make dir="src/main/native/nio/${hy.os.family}" />
<!-- Copy the built shared libs over to the jre/bin dir -->
<copy todir="${hy.jdk}/jre/bin" overwrite="yes">
- <fileset dir="${hy.nio.src.main.native}/nio">
+ <fileset dir="src/main/native/nio">
<include name="*${shlib.suffix}*" />
<include name="*${progdb.suffix}*" if="is.windows" />
<exclude name="*${manifest.suffix}" />
@@ -85,7 +56,7 @@
</copy>
<!-- Copy link exports file on z/OS -->
<copy todir="${hy.hdk}/lib" overwrite="yes">
- <fileset dir="${hy.nio.src.main.native}/nio/${hy.os.family}">
+ <fileset dir="src/main/native/nio/${hy.os.family}">
<include name="*${linklib.suffix}" if="is.zos" />
</fileset>
</copy>
@@ -94,6 +65,7 @@
<target name="clean">
<delete file="${hy.jdk}/jre/lib/boot/nio.jar" />
<delete file="${hy.jdk}/jre/lib/boot/nio-src.jar" />
+ <delete dir="${tests.hdk.dir}" failonerror="false" />
<delete includeemptydirs="true" failonerror="false">
<fileset refid="classes" />
</delete>
@@ -102,17 +74,17 @@
<!-- Clean natives. -->
<target name="clean-native">
- <make dir="${hy.nio.src.main.native}/nio/${hy.os.family}"
+ <make dir="src/main/native/nio/${hy.os.family}"
target="clean" />
</target>
<target name="compile-java">
<echo message="Compiling NIO classes" />
- <mkdir dir="${hy.build}" />
+ <mkdir dir="../../build/classes" />
<javac sourcepath=""
- destdir="${hy.build}"
+ destdir="../../build/classes"
compiler="${hy.javac.compiler}"
memoryMaximumSize="${hy.javac.maxmem}"
source="${hy.javac.source}"
@@ -122,8 +94,8 @@
<compilerarg line="${build.compilerarg}" />
<src>
- <pathelement location="${hy.nio.src.main.java}" />
- <pathelement location="${hy.nio.src.main.java.platform}" />
+ <pathelement location="src/main/java/common" />
+ <pathelement location="src/main/java/${hy.os.family}" />
</src>
<bootclasspath>
@@ -135,9 +107,9 @@
</target>
<target name="copy-resources">
- <mkdir dir="${hy.build}" />
- <copy todir="${hy.build}" includeemptydirs="false">
- <fileset dir="${hy.nio.src.main.java}">
+ <mkdir dir="../../build/classes" />
+ <copy todir="../../build/classes" includeemptydirs="false">
+ <fileset dir="src/main/java/common">
<exclude name="**/*.java" />
</fileset>
</copy>
@@ -145,7 +117,7 @@
<target name="build-jar" depends="svn-info">
<jar destfile="${hy.jdk}/jre/lib/boot/nio.jar"
- manifest="${hy.nio}/META-INF/MANIFEST.MF"
+ manifest="META-INF/MANIFEST.MF"
compress="${hy.jar.compress}">
<fileset refid="classes" />
<manifest>
@@ -156,7 +128,7 @@
</jar>
<jar destfile="${hy.jdk}/jre/lib/boot/nio-src.jar">
- <fileset dir="${hy.nio.src.main.java}" />
+ <fileset dir="src/main/java/common" />
<manifest>
<attribute name="Implementation-Version" value="${svn.info}" />
</manifest>
@@ -165,106 +137,49 @@
</jar>
</target>
- <target name="compile-tests" depends="copy-test-resources">
- <echo message="Compiling NIO tests" />
+ <target name="test-jar" depends="svn-info,compile-tests">
+ <mkdir dir="${tests.hdk.dir}" />
- <mkdir dir="${hy.nio.bin.test}" />
+ <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
- <javac destdir="${hy.nio.bin.test}"
- sourcepath=""
- compiler="${hy.javac.compiler}"
- memoryMaximumSize="${hy.javac.maxmem}"
- source="${hy.javac.source}"
- target="${hy.javac.target}"
- debug="${hy.javac.debug}">
-
- <compilerarg line="${build.compilerarg}" />
+ <jar destfile="${tests.hdk.dir}/nio_tests.jar">
+ <fileset dir="bin/test" />
+ <manifest>
+ <attribute name="Implementation-Version" value="${svn.info}"/>
+ </manifest>
+ <metainf refid="hy.required.metainf-files"/>
+ </jar>
- <src>
- <pathelement location="${hy.nio.src.test.java}" />
- <pathelement location="${hy.nio.src.test.java.platform}" />
- </src>
- <bootclasspath>
- <fileset dir="${hy.jdk}/jre/lib/boot">
- <include name="**/*.jar" />
- </fileset>
- </bootclasspath>
- <classpath location="${hy.hdk}/build/test/support.jar" />
- </javac>
- </target>
+ <mkdir dir="${tests.excludes.hdk.dir}"/>
+ <copy todir="${tests.excludes.hdk.dir}">
+ <fileset dir="make" includes="exclude*"/>
+ <filterchain>
+ <tokenfilter>
+ <replaceregex pattern="\.java" replace="\.class" flags="g"/>
+ </tokenfilter>
+ </filterchain>
+ </copy>
- <target name="prepare-exclude">
- <prepare-exclude-list moduleName="nio"
- dir="./make"
- result="${nio.exclude.file}" />
- </target>
-
- <target name="run-tests">
- <mkdir dir="${tests.output}" />
-
- <property name="test.jre.home" value="${hy.jdk}/jre" />
-
- <junit fork="yes"
- forkmode="${hy.test.forkmode}"
- timeout="${hy.test.timeout}"
- printsummary="withOutAndErr"
- errorproperty="test.errors"
- failureproperty="test.failures"
- showoutput="on"
- dir="${basedir}"
- jvm="${test.jre.home}/bin/java">
-
- <assertions enableSystemAssertions="true">
- <enable />
- </assertions>
-
- <jvmarg line="${hy.test.vmargs}" />
-
- <classpath>
- <pathelement path="${hy.nio.bin.test}" />
- <pathelement path="${hy.hdk}/build/test/support.jar" />
- </classpath>
-
- <formatter type="xml" />
-
- <batchtest todir="${tests.output}" haltonfailure="no">
- <fileset dir="${hy.nio.src.test.java}">
- <!-- if ${test.case} -->
- <include name="${converted.tc}" if="test.case" />
- <!-- unless ${test.case} -->
- <include name="**/*Test.java" unless="test.case" />
- <excludesfile name="${nio.exclude.file}"
- unless="test.case" />
- </fileset>
- <fileset dir="${hy.nio.src.test.java.platform}">
- <!-- if ${test.case} -->
- <include name="${converted.tc}" if="test.case" />
- <!-- unless ${test.case} -->
- <include name="**/*Test.java" unless="test.case" />
- <excludesfile name="${nio.exclude.file}"
- unless="test.case" />
- </fileset>
- </batchtest>
- </junit>
- <antcall target="touch-failures-file" />
- <antcall target="touch-errors-file" />
- </target>
+ <copy todir="${tests.resources.hdk.dir}">
+ <fileset dir="src/test/resources" />
+ </copy>
- <target name="touch-failures-file" if="test.failures">
- <echo file="${tests.output}/test.failures" append="true">nio${line.separator}</echo>
+ <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
</target>
- <target name="touch-errors-file" if="test.errors">
- <echo file="${tests.output}/test.errors" append="true">nio${line.separator}</echo>
+ <target name="compile-tests">
+ <compile-tests description="nio tests">
+ <javac-elements>
+ <src>
+ <pathelement location="src/test/java/common" />
+ <pathelement location="src/test/java/${hy.os.family}" />
+ </src>
+ </javac-elements>
+ </compile-tests>
</target>
- <target name="copy-test-resources">
- <mkdir dir="${hy.nio.bin.test}" />
- <copy todir="${hy.nio.bin.test}" includeemptydirs="false">
- <fileset dir="${hy.nio.src.test.resources}">
- <exclude name="**/*.java" />
- </fileset>
- </copy>
+ <target name="run-tests" depends="test-jar">
+ <ant dir="${tests.hdk.dir}" target="test-module" />
</target>
</project>
Modified: harmony/enhanced/classlib/branches/java6/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java Tue Jul 28 09:30:33 2009
@@ -2123,7 +2123,7 @@
byte[] inputBuffer = new byte[CONTENT_AS_BYTES_LENGTH - pos];
fis.read(inputBuffer);
String test = CONTENT.substring(pos);
- assertTrue(Arrays.equals(test.getBytes(), inputBuffer));
+ assertTrue(Arrays.equals(test.getBytes("iso8859-1"), inputBuffer));
}
/**
Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/build.xml Tue Jul 28 09:30:33 2009
@@ -1,47 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
-->
<project name="NIO_CHAR Build" default="build" basedir=".">
<description>Build for NIO_CHAR component</description>
- <!-- import common properties -->
+ <property name="hy.module" value="nio_char" />
<property name="hy.hdk" location="${basedir}/../../deploy" />
<import file="${hy.hdk}/build/ant/properties.xml" />
- <property name="tests.output" location="../../build/test_report" />
-
- <!-- set global properties for this build. -->
- <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
-
- <fileset id="classes" dir="${hy.build}">
- <or>
- <present targetdir="${hy.nio_char.src.main.java}" />
- <present targetdir="${hy.nio_char.src.main.java}">
- <mapper type="regexp"
- from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
- to="\1.java"/>
- </present>
- </or>
- </fileset>
-
- <property name="nio_char.exclude.file" location="${hy.hdk}/build/nio_char.exclude" />
+ <property file="../../make/depends.properties" />
<target name="build" depends="compile-java, copy-resources, build-jar" />
@@ -49,11 +31,11 @@
<target name="build-native" depends="build-native-all" />
<target name="build-native-all" >
- <make dir="${hy.nio_char.src.main.native}/niochar/${hy.os.family}" />
+ <make dir="src/main/native/niochar/${hy.os.family}" />
<!-- Copy the built shared libs over to the jre/bin dir -->
<copy todir="${hy.jdk}/jre/bin" overwrite="yes">
- <fileset dir="${hy.nio_char.src.main.native}/niochar">
+ <fileset dir="src/main/native/niochar">
<patternset includes="*${shlib.suffix}*" />
</fileset>
</copy>
@@ -71,17 +53,18 @@
</target>
<!-- internal target for local and global test run sequence -->
- <target name="-test-module" depends="build, compile-tests, prepare-exclude, run-tests" />
+ <target name="-test-module" depends="build, run-tests" />
<!-- Clean natives. -->
<target name="clean-native">
- <make dir="${hy.nio_char.src.main.native}/niochar/${hy.os.family}"
+ <make dir="src/main/native/niochar/${hy.os.family}"
target="clean" />
</target>
<target name="clean">
- <delete file="${hy.jdk}/jre/lib/boot/${hy.nio_char.packaging.jarname}.jar" />
- <delete file="${hy.jdk}/jre/lib/boot/${hy.nio_char.packaging.jarname}-src.jar" />
+ <delete file="${hy.jdk}/jre/lib/boot/nio_char.jar" />
+ <delete file="${hy.jdk}/jre/lib/boot/nio_char-src.jar" />
+ <delete dir="${tests.hdk.dir}" failonerror="false" />
<delete failonerror="false">
<fileset refid="classes" />
</delete>
@@ -91,11 +74,11 @@
<target name="compile-java">
<echo message="Compiling NIO_CHAR classes" />
- <mkdir dir="${hy.build}" />
+ <mkdir dir="../../build/classes" />
<javac sourcepath=""
- srcdir="${hy.nio_char.src.main.java}"
- destdir="${hy.build}"
+ srcdir="src/main/java"
+ destdir="../../build/classes"
compiler="${hy.javac.compiler}"
memoryMaximumSize="${hy.javac.maxmem}"
source="${hy.javac.source}"
@@ -116,9 +99,9 @@
</target>
<target name="copy-resources">
- <mkdir dir="${hy.build}" />
- <copy todir="${hy.build}" includeemptydirs="false">
- <fileset dir="${hy.nio_char.src.main.java}">
+ <mkdir dir="../../build/classes" />
+ <copy todir="../../build/classes" includeemptydirs="false">
+ <fileset dir="src/main/java">
<exclude name="**/*.java" />
<exclude name="**/java.nio.charset.spi.CharsetProvider" />
</fileset>
@@ -126,11 +109,11 @@
</target>
<target name="build-jar" depends="svn-info">
- <jar destfile="${hy.jdk}/jre/lib/boot/${hy.nio_char.packaging.jarname}.jar"
- manifest="${hy.nio_char}/META-INF/MANIFEST.MF"
+ <jar destfile="${hy.jdk}/jre/lib/boot/nio_char.jar"
+ manifest="META-INF/MANIFEST.MF"
compress="${hy.jar.compress}">
<metainf prefix="META-INF/services"
- dir="${hy.nio_char.src.main.java}/org/apache/harmony/niochar"
+ dir="src/main/java/org/apache/harmony/niochar"
includes="java.nio.charset.spi.CharsetProvider"/>
<fileset refid="classes" />
<manifest>
@@ -140,11 +123,11 @@
<metainf refid="hy.required.metainf-files"/>
</jar>
- <jar destfile="${hy.jdk}/jre/lib/boot/${hy.nio_char.packaging.jarname}-src.jar">
+ <jar destfile="${hy.jdk}/jre/lib/boot/nio_char-src.jar">
<metainf prefix="META-INF/services"
- dir="${hy.nio_char.src.main.java}/org/apache/harmony/niochar"
+ dir="src/main/java/org/apache/harmony/niochar"
includes="java.nio.charset.spi.CharsetProvider"/>
- <fileset dir="${hy.nio_char.src.main.java}">
+ <fileset dir="src/main/java">
<excludesfile name="${basedir}/make/excludesfile"/>
</fileset>
<manifest>
@@ -155,102 +138,49 @@
</jar>
</target>
- <target name="compile-tests" depends="copy-test-resources">
- <echo message="Compiling NIO_CHAR tests" />
-
- <mkdir dir="${hy.nio_char.bin.test}" />
+ <target name="test-jar" depends="svn-info,compile-tests">
+ <mkdir dir="${tests.hdk.dir}" />
- <javac srcdir="${hy.nio_char.src.test.java}"
- destdir="${hy.nio_char.bin.test}"
- sourcepath=""
- compiler="${hy.javac.compiler}"
- memoryMaximumSize="${hy.javac.maxmem}"
- source="${hy.javac.source}"
- target="${hy.javac.target}"
- debug="${hy.javac.debug}">
-
- <compilerarg line="${build.compilerarg}" />
-
- <bootclasspath>
- <fileset dir="${hy.jdk}/jre/lib/boot">
- <include name="**/*.jar" />
- </fileset>
- </bootclasspath>
- <classpath location="../../build/tests" />
- <classpath location="${hy.hdk}/build/test/support.jar" />
- </javac>
- </target>
+ <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
- <target name="prepare-exclude">
- <prepare-exclude-list moduleName="nio_char" dir="./make"
- result="${nio_char.exclude.file}"/>
- </target>
-
- <target name="run-tests">
-
- <mkdir dir="${tests.output}" />
-
- <property name="test.jre.home" value="${hy.jdk}/jre" />
-
- <junit fork="yes"
- forkmode="${hy.test.forkmode}"
- timeout="${hy.test.timeout}"
- printsummary="withOutAndErr"
- errorproperty="test.errors"
- failureproperty="test.failures"
- showoutput="on"
- dir="${basedir}"
- jvm="${test.jre.home}/bin/java">
-
- <assertions enableSystemAssertions="true">
- <enable />
- </assertions>
-
- <jvmarg line="${hy.test.vmargs}" />
-
- <classpath>
- <pathelement path="${hy.nio_char.bin.test}"/>
- <pathelement path="../../build/tests" />
- <pathelement path="${hy.hdk}/build/test/support.jar" />
- <fileset dir="${hy.nio_char.src.test.resources}/jars">
- <include name="**/*.jar" />
- </fileset>
- </classpath>
-
- <formatter type="xml" />
+ <jar destfile="${tests.hdk.dir}/nio_char_tests.jar">
+ <fileset dir="bin/test" />
+ <manifest>
+ <attribute name="Implementation-Version" value="${svn.info}"/>
+ </manifest>
+ <metainf refid="hy.required.metainf-files"/>
+ </jar>
- <batchtest todir="${tests.output}" haltonfailure="no" >
+ <mkdir dir="${tests.excludes.hdk.dir}"/>
+ <copy todir="${tests.excludes.hdk.dir}">
+ <fileset dir="make" includes="exclude*"/>
+ <filterchain>
+ <tokenfilter>
+ <replaceregex pattern="\.java" replace="\.class" flags="g"/>
+ </tokenfilter>
+ </filterchain>
+ </copy>
- <fileset dir="${hy.nio_char.src.test.java}">
- <!-- if ${test.case} -->
- <include name="${converted.tc}" if="test.case" />
- <!-- unless ${test.case} -->
- <include name="**/*Test.java" unless="test.case" />
- <excludesfile name="${nio_char.exclude.file}" unless="test.case" />
- </fileset>
- </batchtest>
- </junit>
- <antcall target="touch-failures-file" />
- <antcall target="touch-errors-file" />
- </target>
+ <copy todir="${tests.resources.hdk.dir}">
+ <fileset dir="src/test/resources" />
+ <fileset dir="META-INF" />
+ </copy>
- <target name="touch-failures-file" if="test.failures">
- <echo file="${tests.output}/test.failures"
- append="true">nio_char${line.separator}</echo>
+ <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
</target>
- <target name="touch-errors-file" if="test.errors">
- <echo file="${tests.output}/test.errors"
- append="true">nio_char${line.separator}</echo>
+ <target name="compile-tests">
+ <compile-tests description="nio_char tests">
+ <javac-elements>
+ <src>
+ <pathelement location="src/test/java" />
+ </src>
+ </javac-elements>
+ </compile-tests>
</target>
- <target name="copy-test-resources">
- <mkdir dir="${hy.nio_char.bin.test}" />
- <copy todir="${hy.nio_char.bin.test}" includeemptydirs="false">
- <fileset dir="${hy.nio_char.src.test.resources}">
- <exclude name="**/*.java" />
- </fileset>
- </copy>
+ <target name="run-tests" depends="test-jar">
+ <ant dir="${tests.hdk.dir}" target="test-module" />
</target>
</project>
Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetProviderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetProviderTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetProviderTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetProviderTest.java Tue Jul 28 09:30:33 2009
@@ -50,7 +50,7 @@
*/
public CharsetProviderTest(String arg0) {
super(arg0);
- CONFIG_FILE1 = System.getProperty("user.dir")+"/bin/test";
+ CONFIG_FILE1 = System.getProperty("user.dir") + "/resources";
String sep = System.getProperty("file.separator");
Modified: harmony/enhanced/classlib/branches/java6/modules/orb/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/orb/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/orb/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/orb/build.xml Tue Jul 28 09:30:33 2009
@@ -21,8 +21,8 @@
<project name="ORB Build" default="build" basedir=".">
<description>Build for ORB component</description>
+ <property name="hy.module" value="orb" />
<property name="hy.hdk" location="${basedir}/../../deploy" />
- <property name="hy.jdk" location="${hy.hdk}/jdk" />
<property name="depends.dir" location="${basedir}/../../depends" />
<import file="${hy.hdk}/build/ant/properties.xml" />
<import file="${hy.hdk}/build/ant/depends.xml" />
Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/build.xml Tue Jul 28 09:30:33 2009
@@ -19,39 +19,14 @@
<project name="PACK200 Build" default="build" basedir=".">
<description>Build for PACK200 component</description>
- <!-- import common properties -->
+ <property name="hy.module" value="pack200" />
<property name="hy.hdk" location="${basedir}/../../deploy" />
- <property name="hy.jdk" location="${hy.hdk}/jdk" />
<property name="depends.dir" location="${basedir}/../../depends" />
<import file="${hy.hdk}/build/ant/properties.xml" />
<import file="${hy.hdk}/build/ant/depends.xml" />
- <property name="tests.output" location="../../build/test_report" />
-
- <!-- set global properties for this build. -->
- <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
-
- <fileset id="classes" dir="${hy.build}">
- <or>
- <present targetdir="${hy.pack200.src.main.java}" />
- <present targetdir="${hy.pack200.src.main.java}">
- <mapper type="regexp"
- from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
- to="\1.java"/>
- </present>
- <present targetdir="${hy.pack200.src.main.java5}" />
- <present targetdir="${hy.pack200.src.main.java5}">
- <mapper type="regexp"
- from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
- to="\1.java"/>
- </present>
- </or>
- </fileset>
-
<property file="../../make/depends.properties" />
- <property name="pack200.exclude.file" location="${hy.hdk}/build/pack200.exclude" />
-
<target name="build"
depends="check-depends, compile-java, copy-resources, build-jar" />
@@ -84,11 +59,12 @@
</target>
<!-- internal target for local and global test run sequence -->
- <target name="-test-module" depends="build, compile-tests, prepare-exclude, run-tests" />
+ <target name="-test-module" depends="build, run-tests" />
<target name="clean">
<delete file="${hy.jdk}/jre/lib/boot/pack200.jar" />
<delete file="${hy.jdk}/jre/lib/boot/pack200-src.jar" />
+ <delete dir="${tests.hdk.dir}" failonerror="false" />
<delete failonerror="false">
<fileset refid="classes" />
</delete>
@@ -98,16 +74,16 @@
<target name="compile-java">
<echo message="Compiling PACK200 classes" />
- <mkdir dir="${hy.build}" />
+ <mkdir dir="../../build/classes" />
<!-- Ordinary classes -->
<javac sourcepath=""
- srcdir="${hy.pack200.src.main.java}"
- destdir="${hy.build}"
+ srcdir="src/main/java"
+ destdir="../../build/classes"
compiler="${hy.javac.compiler}"
memoryMaximumSize="${hy.javac.maxmem}"
- source="${hy.pack200.javac.source}"
- target="${hy.pack200.javac.target}"
+ source="1.4"
+ target="1.4"
debug="${hy.javac.debug}">
<compilerarg line="${build.compilerarg}" />
@@ -120,8 +96,8 @@
</javac>
<!-- Java5 classes, with generics -->
<javac sourcepath=""
- srcdir="${hy.pack200.src.main.java5}"
- destdir="${hy.build}"
+ srcdir="src/main/java5"
+ destdir="../../build/classes"
compiler="${hy.javac.compiler}"
memoryMaximumSize="${hy.javac.maxmem}"
source="${hy.javac.source}"
@@ -139,9 +115,9 @@
</target>
<target name="copy-resources">
- <mkdir dir="${hy.build}" />
- <copy todir="${hy.build}" includeemptydirs="false">
- <fileset dir="${hy.pack200.src.main.java}">
+ <mkdir dir="../../build/classes" />
+ <copy todir="../../build/classes" includeemptydirs="false">
+ <fileset dir="src/main/java">
<exclude name="**/*.java" />
</fileset>
</copy>
@@ -149,7 +125,7 @@
<target name="build-jar" depends="svn-info">
<jar destfile="${hy.jdk}/jre/lib/boot/pack200.jar"
- manifest="${hy.pack200}/META-INF/MANIFEST.MF"
+ manifest="META-INF/MANIFEST.MF"
compress="${hy.jar.compress}">
<fileset refid="classes" />
<manifest>
@@ -160,8 +136,8 @@
</jar>
<jar destfile="${hy.jdk}/jre/lib/boot/pack200-src.jar">
- <fileset dir="${hy.pack200.src.main.java}" />
- <fileset dir="${hy.pack200.src.main.java}/../java5" />
+ <fileset dir="src/main/java" />
+ <fileset dir="src/main/java/../java5" />
<manifest>
<attribute name="Implementation-Version" value="${svn.info}"/>
</manifest>
@@ -170,17 +146,47 @@
</jar>
</target>
- <target name="compile-tests" depends="copy-test-resources" >
- <mkdir dir="${hy.pack200.bin.test}" />
+ <target name="test-jar" depends="svn-info,compile-tests">
+ <mkdir dir="${tests.hdk.dir}" />
+
+ <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+
+ <jar destfile="${tests.hdk.dir}/pack200_tests.jar">
+ <fileset dir="bin/test" />
+ <manifest>
+ <attribute name="Implementation-Version" value="${svn.info}"/>
+ </manifest>
+ <metainf refid="hy.required.metainf-files"/>
+ </jar>
+
+ <mkdir dir="${tests.excludes.hdk.dir}"/>
+ <copy todir="${tests.excludes.hdk.dir}">
+ <fileset dir="make" includes="exclude*"/>
+ <filterchain>
+ <tokenfilter>
+ <replaceregex pattern="\.java" replace="\.class" flags="g"/>
+ </tokenfilter>
+ </filterchain>
+ </copy>
+
+ <copy todir="${tests.resources.hdk.dir}">
+ <fileset dir="src/test/resources" />
+ </copy>
+
+ <copy file="${junit.jar}" todir="${hy.hdk}/build/test" />
+ </target>
+
+ <target name="compile-tests">
+ <mkdir dir="bin/test" />
<echo message="Compiling PACK200 tests" />
- <javac srcdir="${hy.pack200.src.test.java}"
- destdir="${hy.pack200.bin.test}"
+ <javac srcdir="src/test/java"
+ destdir="bin/test"
sourcepath=""
compiler="${hy.javac.compiler}"
memoryMaximumSize="${hy.javac.maxmem}"
- source="${hy.pack200.javac.source}"
- target="${hy.pack200.javac.target}"
+ source="1.4"
+ target="1.4"
debug="${hy.javac.debug}">
<compilerarg line="${build.compilerarg}" />
@@ -190,79 +196,11 @@
<include name="**/*.jar" />
</fileset>
</bootclasspath>
- <classpath location="../../build/tests" />
</javac>
</target>
- <target name="prepare-exclude">
- <prepare-exclude-list moduleName="pack200" dir="./make"
- result="${pack200.exclude.file}"/>
- </target>
-
- <target name="run-tests">
-
- <mkdir dir="${tests.output}" />
-
- <property name="test.jre.home" value="${hy.jdk}/jre" />
-
- <echo message="Running PACK200 tests" />
- <junit fork="yes"
- forkmode="${hy.test.forkmode}"
- timeout="${hy.test.timeout}"
- printsummary="withOutAndErr"
- errorproperty="test.errors"
- failureproperty="test.failures"
- showoutput="on"
- dir="${basedir}"
- jvm="${test.jre.home}/bin/java">
-
- <assertions enableSystemAssertions="true">
- <enable />
- </assertions>
-
- <jvmarg line="${hy.test.vmargs}" />
-
- <classpath>
- <pathelement path="${hy.pack200.bin.test}"/>
- <pathelement path="${hy.pack200.src.test.resources}"/>
- </classpath>
- <classpath location="../../build/tests" />
- <classpath location="${hy.hdk}/build/test/support.jar" />
-
- <formatter type="xml" />
-
- <batchtest todir="${tests.output}" haltonfailure="no" >
-
- <fileset dir="${hy.pack200.src.test.java}">
- <!-- if ${test.case} -->
- <include name="${converted.tc}" if="test.case" />
- <!-- unless ${test.case} -->
- <include name="**/*Test.java" unless="test.case" />
- <excludesfile name="${pack200.exclude.file}" unless="test.case" />
- </fileset>
- </batchtest>
- </junit>
- <antcall target="touch-failures-file" />
- <antcall target="touch-errors-file" />
- </target>
-
- <target name="touch-failures-file" if="test.failures">
- <echo file="${tests.output}/test.failures"
- append="true">pack200${line.separator}</echo>
- </target>
-
- <target name="touch-errors-file" if="test.errors">
- <echo file="${tests.output}/test.errors"
- append="true">pack200${line.separator}</echo>
- </target>
-
- <target name="copy-test-resources">
- <mkdir dir="${hy.pack200.bin.test}" />
- <copy todir="${hy.pack200.bin.test}" includeemptydirs="false">
- <fileset dir="${hy.pack200.src.test.resources}">
- <exclude name="**/*.java" />
- </fileset>
- </copy>
+ <target name="run-tests" depends="test-jar">
+ <ant dir="${tests.hdk.dir}" target="test-module" />
</target>
</project>
Propchange: harmony/enhanced/classlib/branches/java6/modules/pack200/depends/manifests/asm-3.1/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 28 09:30:33 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/pack200/depends/manifests/asm-3.1:785554-790471
+/harmony/enhanced/classlib/trunk/modules/pack200/depends/manifests/asm-3.1:785554-798021