harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ghar...@apache.org
Subject svn commit: r395214 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni: make/common/ src/test/java/tests/api/java/lang/ src/test/resources/serialization/ src/test/resources/serialization/java/ src/test/resources/serialization/java/lang/
Date Wed, 19 Apr 2006 11:29:28 GMT
Author: gharley
Date: Wed Apr 19 04:29:27 2006
New Revision: 395214

URL: http://svn.apache.org/viewcvs?rev=395214&view=rev
Log:
HARMONY-334 : java.lang.IllegalArgumentException should implement Serializable

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/IllegalArgumentException.ser
  (with props)
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/hyproperties.xml
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/IllegalArgumentExceptionTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/build.xml?rev=395214&r1=395213&r2=395214&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/build.xml Wed Apr 19
04:29:27 2006
@@ -44,7 +44,7 @@
 	</target>
 
 
-	<target name="compile.tests">
+	<target name="compile.tests" depends="copy.test.resources">
 		<echo message="Compiling LUNI tests from ${hy.luni.src.test.java}" />
 
 		<mkdir dir="${hy.luni.bin.test}" />
@@ -61,7 +61,7 @@
 					<include name="**/*.jar" />
 				</fileset>
 			</bootclasspath>
-			<classpath location="../../../../build/tests" />
+			<classpath location="${hy.tests.support.bin}" />
 		</javac>
 	</target>
 
@@ -93,7 +93,7 @@
 
 			<classpath>
 				<pathelement path="${hy.luni.bin.test}" />
-				<pathelement path="../../../../build/tests" />
+				<pathelement path="${hy.tests.support.bin}" />
 			</classpath>
 
 			<formatter type="xml" />
@@ -180,5 +180,15 @@
 	<target name="copy.resources">
 		<!-- Nothing for LUNI -->
 	</target>
+	
+	<target name="copy.test.resources">
+		<mkdir dir="${hy.luni.bin.test}" />
+        <copy todir="${hy.luni.bin.test}" includeemptydirs="false">
+            <fileset dir="${hy.luni.src.test.resources}">
+                <exclude name="**/*.java" />
+            </fileset>
+        </copy>
+	</target>	
+	
 </project>
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/hyproperties.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/hyproperties.xml?rev=395214&r1=395213&r2=395214&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/hyproperties.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/hyproperties.xml Wed
Apr 19 04:29:27 2006
@@ -24,7 +24,7 @@
          </main>
          <test>
             <java location="src/test/java" />
-            <resources location="src/main/resources" />
+            <resources location="src/test/resources" />
          </test>
          <natives location="src/natives" />
       </src>
@@ -40,5 +40,8 @@
 
    <tests>
       <reports location="../../build/test_report" />
+      <support>
+          <bin location="../../build/tests" />
+      </support>
    </tests>
 </hy>

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/IllegalArgumentExceptionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/IllegalArgumentExceptionTest.java?rev=395214&r1=395213&r2=395214&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/IllegalArgumentExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/IllegalArgumentExceptionTest.java
Wed Apr 19 04:29:27 2006
@@ -1,4 +1,4 @@
-/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+/* Copyright 1998, 2006 The Apache Software Foundation or its licensors, as applicable
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -15,8 +15,12 @@
 
 package tests.api.java.lang;
 
+import tests.util.SerializationTester;
+
 public class IllegalArgumentExceptionTest extends junit.framework.TestCase {
 
+	private static final String SERIALIZATION_FILE_NAME = "serialization/java/lang/IllegalArgumentException.ser";
//$NON-NLS-1$
+	
 	class TestThread implements Runnable {
 		public void run() {
 			try {
@@ -59,6 +63,25 @@
 				ill.getMessage().equals("testing illArg exception"));
 	}
 
+	/**
+	 * @tests serialization/deserilazation.
+	 */
+	public void test_serialization() throws Exception {
+		IllegalArgumentException srcIllegalArgumentException = new IllegalArgumentException();
+		IllegalArgumentException destIllegalArgumentException = (IllegalArgumentException) SerializationTester
+				.getDeserilizedObject(srcIllegalArgumentException);
+	}
+
+	/**
+	 * @tests serialization/deserilazation compatibility with RI.
+	 */
+	public void test_serializationCompatibility() throws Exception {
+		IllegalArgumentException srcIllegalArgumentException = new IllegalArgumentException();
+		IllegalArgumentException destIllegalArgumentException = (IllegalArgumentException) SerializationTester
+				.readObject(srcIllegalArgumentException,
+						SERIALIZATION_FILE_NAME);
+	}
+	
 	/**
 	 * Sets up the fixture, for example, open a network connection. This method
 	 * is called before a test is executed.

Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/IllegalArgumentException.ser
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/IllegalArgumentException.ser?rev=395214&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/IllegalArgumentException.ser
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message