summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2005-05-27 09:15:02 +0000
committermichelou <michelou@epfl.ch>2005-05-27 09:15:02 +0000
commit0eabdfe72aad053e1a15ed2defc2306876362dbf (patch)
tree242e9a3d1e949124d8935ac6ca58f09fa08600e1 /test
parent5c39c6a1a93dc10cd6d40da1361e597e51b537dc (diff)
downloadscala-0eabdfe72aad053e1a15ed2defc2306876362dbf.tar.gz
scala-0eabdfe72aad053e1a15ed2defc2306876362dbf.tar.bz2
scala-0eabdfe72aad053e1a15ed2defc2306876362dbf.zip
- replaced all occurrences of "<variable>.type"...
- replaced all occurrences of "<variable>.type" with the declared type.
Diffstat (limited to 'test')
-rw-r--r--test/files/jvm/serialization.scala54
1 files changed, 27 insertions, 27 deletions
diff --git a/test/files/jvm/serialization.scala b/test/files/jvm/serialization.scala
index e62243f876..40d1c38370 100644
--- a/test/files/jvm/serialization.scala
+++ b/test/files/jvm/serialization.scala
@@ -21,7 +21,7 @@ object EqualityTest {
//############################################################################
// Test classes in package "scala"
-object Test1_scala {
+object Test1_scala with java.io.Serializable {
private def arrayToString[A](arr: Array[A]): String = {
List.fromArray(arr).mkString("Array[",",","]");
}
@@ -43,10 +43,10 @@ object Test1_scala {
out.close();
val in = new ObjectInputStream(new FileInputStream(dataFile));
- val y1 = in.readObject().asInstanceOf[x1.type];
- val y2 = in.readObject().asInstanceOf[x2.type];
- val y3 = in.readObject().asInstanceOf[x3.type];
- val y4 = in.readObject().asInstanceOf[x4.type];
+ val y1 = in.readObject().asInstanceOf[List[All]];
+ val y2 = in.readObject().asInstanceOf[Option[All]];
+ val y3 = in.readObject().asInstanceOf[Array[Int]];
+ val y4 = in.readObject().asInstanceOf[Function[Int, Int]];
in.close();
System.out.println("x1 = " + x1);
@@ -77,7 +77,7 @@ object Test1_scala {
//############################################################################
// Test classes in package "scala.collection.immutable"
-object Test2_immutable {
+object Test2_immutable with java.io.Serializable {
import scala.collection.immutable.{BitSet,ListMap,ListSet,Queue,Stack,
TreeSet,TreeMap};
@@ -118,14 +118,14 @@ object Test2_immutable {
out.close();
val in = new ObjectInputStream(new FileInputStream(dataFile));
- val y1 = in.readObject().asInstanceOf[x1.type];
- val y2 = in.readObject().asInstanceOf[x2.type];
- val y3 = in.readObject().asInstanceOf[x3.type];
- val y4 = in.readObject().asInstanceOf[x4.type];
- val y5 = in.readObject().asInstanceOf[x5.type];
- val y6 = in.readObject().asInstanceOf[x6.type];
- val y7 = in.readObject().asInstanceOf[x7.type];
- val y8 = in.readObject().asInstanceOf[x8.type];
+ val y1 = in.readObject().asInstanceOf[List[Pair[String, Int]]];
+ val y2 = in.readObject().asInstanceOf[ListMap[String, Int]];
+ val y3 = in.readObject().asInstanceOf[BitSet];
+ val y4 = in.readObject().asInstanceOf[ListSet[Int]];
+ val y5 = in.readObject().asInstanceOf[Queue[String]];
+ val y6 = in.readObject().asInstanceOf[Stack[String]];
+ val y7 = in.readObject().asInstanceOf[TreeMap[Int, String]];
+ val y8 = in.readObject().asInstanceOf[TreeSet[Int]];
in.close();
EqualityTest.check(x1, y1);
@@ -183,12 +183,12 @@ object Test3_mutable {
out.close();
val in = new ObjectInputStream(new FileInputStream(dataFile));
- val y1 = in.readObject().asInstanceOf[x1.type];
- val y2 = in.readObject().asInstanceOf[x2.type];
- val y3 = in.readObject().asInstanceOf[x3.type];
- val y4 = in.readObject().asInstanceOf[x4.type];
- val y5 = in.readObject().asInstanceOf[x5.type];
- val y6 = in.readObject().asInstanceOf[x6.type];
+ val y1 = in.readObject().asInstanceOf[HashMap[String, Int]];
+ val y2 = in.readObject().asInstanceOf[BitSet];
+ val y3 = in.readObject().asInstanceOf[HashSet[String]];
+ val y4 = in.readObject().asInstanceOf[LinkedList[Int]];
+ val y5 = in.readObject().asInstanceOf[Queue[Int]];
+ val y6 = in.readObject().asInstanceOf[Stack[Int]];
in.close();
EqualityTest.check(x1, y1);
@@ -251,8 +251,8 @@ object Test4_xml {
out.close();
val in = new ObjectInputStream(new FileInputStream(dataFile));
- val y1 = in.readObject().asInstanceOf[x1.type];
- val y2 = in.readObject().asInstanceOf[x2.type];
+ val y1 = in.readObject().asInstanceOf[scala.xml.Elem];
+ val y2 = in.readObject().asInstanceOf[scala.xml.Elem];
in.close();
EqualityTest.check(x1, y1);
@@ -294,8 +294,8 @@ object Test5 {
out.close();
val in = new ObjectInputStream(new FileInputStream(dataFile));
- val y1 = in.readObject().asInstanceOf[x1.type];
- val y2 = in.readObject().asInstanceOf[x2.type];
+ val y1 = in.readObject().asInstanceOf[Person];
+ val y2 = in.readObject().asInstanceOf[Employee];
in.close();
EqualityTest.check(x1, y1);
@@ -331,9 +331,9 @@ object Test6 with java.io.Serializable {
out.close();
val in = new ObjectInputStream(new FileInputStream(dataFile));
- val y1 = in.readObject().asInstanceOf[x1.type];
- val y2 = in.readObject().asInstanceOf[x2.type];
- val y3 = in.readObject().asInstanceOf[x3.type];
+ val y1 = in.readObject().asInstanceOf[Person];
+ val y2 = in.readObject().asInstanceOf[Employee];
+ val y3 = in.readObject().asInstanceOf[Person];
in.close();
EqualityTest.check(x1, y1);