summaryrefslogtreecommitdiff
path: root/test/files/jvm/serialization-new.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/jvm/serialization-new.scala')
-rw-r--r--test/files/jvm/serialization-new.scala67
1 files changed, 1 insertions, 66 deletions
diff --git a/test/files/jvm/serialization-new.scala b/test/files/jvm/serialization-new.scala
index 1522fc8e27..1b5e856645 100644
--- a/test/files/jvm/serialization-new.scala
+++ b/test/files/jvm/serialization-new.scala
@@ -419,70 +419,6 @@ object Test3_mutable {
}
}
-
-//############################################################################
-// Test classes in package "scala.xml"
-
-object Test4_xml {
- import scala.xml.{Attribute, Document, Elem, Null, PrefixedAttribute, Text}
-
- case class Person(name: String, age: Int)
-
- try {
- // Attribute
- val a1 = new PrefixedAttribute("xml", "src", Text("hello"), Null)
- val _a1: Attribute = read(write(a1))
- check(a1, _a1)
-
- // Document
- val d1 = new Document
- d1.docElem = <title></title>
- d1.encoding = Some("UTF-8")
- val _d1: Document = read(write(d1))
- check(d1, _d1)
-
- // Elem
- val e1 = <html><title>title</title><body></body></html>;
- val _e1: Elem = read(write(e1))
- check(e1, _e1)
-
- class AddressBook(a: Person*) {
- private val people: List[Person] = a.toList
- def toXHTML =
- <table cellpadding="2" cellspacing="0">
- <tr>
- <th>Last Name</th>
- <th>First Name</th>
- </tr>
- { for (p <- people) yield
- <tr>
- <td> { p.name } </td>
- <td> { p.age.toString() } </td>
- </tr> }
- </table>;
- }
-
- val people = new AddressBook(
- Person("Tom", 20),
- Person("Bob", 22),
- Person("James", 19))
-
- val e2 =
- <html>
- <body>
- { people.toXHTML }
- </body>
- </html>;
- val _e2: Elem = read(write(e2))
- check(e2, _e2)
- }
- catch {
- case e: Exception =>
- println("Error in Test4_xml: " + e)
- throw e
- }
-}
-
//############################################################################
// Test user-defined classes WITHOUT nesting
@@ -594,11 +530,10 @@ object Test8 {
// Test code
object Test {
- def main(args: Array[String]) {
+ def main(args: Array[String]): Unit = {
Test1_scala
Test2_immutable
Test3_mutable
- Test4_xml
Test5
Test6
Test7