diff --git a/.travis.yml b/.travis.yml
index 432ad3902..95e17b1f9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,6 +7,7 @@ jdk:
scala:
- 2.12.8
- 2.13.0-RC2
+ - 0.14.0-RC1
env:
global:
@@ -28,6 +29,10 @@ matrix:
env: SCALAJS_VERSION=0.6.27
- jdk: openjdk11
env: SCALAJS_VERSION=1.0.0-M7
+ - scala: 0.14.0-RC1
+ env: SCALAJS_VERSION=0.6.27
+ - scala: 0.14.0-RC1
+ env: SCALAJS_VERSION=1.0.0-M7
script:
- admin/build.sh
diff --git a/build.sbt b/build.sbt
index eb8e6722d..d1eff4661 100644
--- a/build.sbt
+++ b/build.sbt
@@ -4,19 +4,49 @@ import ScalaModulePlugin._
crossScalaVersions in ThisBuild := List("2.12.8", "2.13.0-RC2")
+lazy val configSettings: Seq[Setting[_]] = Seq(
+ unmanagedSourceDirectories ++= {
+ unmanagedSourceDirectories.value.flatMap { dir =>
+ val sv = scalaVersion.value
+ Seq(
+ CrossVersion.partialVersion(sv) match {
+ case Some((2, 13)) => file(dir.getPath ++ "-2.13+")
+ case _ => file(dir.getPath ++ "-2.13-")
+ },
+ CrossVersion.partialVersion(sv) match {
+ case Some((2, _)) => file(dir.getPath ++ "-2.x")
+ case _ => file(dir.getPath ++ "-3.x")
+ }
+ )
+ }
+ }
+)
+
+
lazy val xml = crossProject(JSPlatform, JVMPlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Full)
.in(file("."))
.settings(scalaModuleSettings)
.jvmSettings(scalaModuleSettingsJVM)
+ .jvmSettings(
+ crossScalaVersions += "0.14.0-RC1"
+ )
.settings(
name := "scala-xml",
version := "2.0.0-SNAPSHOT",
- // Compiler team advised avoiding the -Xsource:2.14 option for releases.
- // The output with -Xsource should be periodically checked, though.
- scalacOptions ++= "-deprecation:false -feature -Xlint:-stars-align,-nullary-unit,_".split("\\s+").to[Seq],
+ scalacOptions ++= {
+ val opts =
+ if (isDotty.value)
+ "-language:Scala2"
+ else
+ // Compiler team advised avoiding the -Xsource:2.14 option for releases.
+ // The output with -Xsource should be periodically checked, though.
+ "-deprecation:false -feature -Xlint:-stars-align,-nullary-unit,_"
+ opts.split("\\s+").to[Seq]
+ },
+
scalacOptions in Test += "-Xxml:coalescing",
mimaPreviousVersion := {
@@ -68,16 +98,6 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform)
)
},
- unmanagedSourceDirectories in Compile ++= {
- (unmanagedSourceDirectories in Compile).value.map { dir =>
- val sv = scalaVersion.value
- CrossVersion.partialVersion(sv) match {
- case Some((2, 13)) => file(dir.getPath ++ "-2.13+")
- case _ => file(dir.getPath ++ "-2.13-")
- }
- }
- },
-
apiMappings ++= Map(
scalaInstance.value.libraryJar
-> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/")
@@ -101,13 +121,21 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform)
}
}
)
+ .settings(
+ inConfig(Compile)(configSettings) ++ inConfig(Test)(configSettings)
+ )
.jvmSettings(
OsgiKeys.exportPackage := Seq(s"scala.xml.*;version=${version.value}"),
libraryDependencies += "junit" % "junit" % "4.12" % Test,
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.9" % Test,
- libraryDependencies += ("org.scala-lang" % "scala-compiler" % scalaVersion.value % Test).exclude("org.scala-lang.modules", s"scala-xml_${scalaBinaryVersion.value}")
+ libraryDependencies ++= {
+ if (isDotty.value)
+ Seq()
+ else
+ Seq(("org.scala-lang" % "scala-compiler" % scalaVersion.value % Test).exclude("org.scala-lang.modules", s"scala-xml_${scalaBinaryVersion.value}"))
+ }
)
.jsSettings(
// Scala.js cannot run forked tests
diff --git a/jvm/src/test/scala/scala/xml/CompilerErrors.scala b/jvm/src/test/scala-2.x/scala/xml/CompilerErrors.scala
similarity index 100%
rename from jvm/src/test/scala/scala/xml/CompilerErrors.scala
rename to jvm/src/test/scala-2.x/scala/xml/CompilerErrors.scala
diff --git a/jvm/src/test/scala-2.x/scala/xml/XMLTestJVM2x.scala b/jvm/src/test/scala-2.x/scala/xml/XMLTestJVM2x.scala
new file mode 100644
index 000000000..40bf56184
--- /dev/null
+++ b/jvm/src/test/scala-2.x/scala/xml/XMLTestJVM2x.scala
@@ -0,0 +1,138 @@
+package scala.xml
+
+import language.postfixOps
+
+import org.junit.{Test => UnitTest}
+import org.junit.Assert.assertTrue
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertEquals
+import scala.xml.parsing.ConstructingParser
+import java.io.StringWriter
+import java.io.ByteArrayOutputStream
+import java.io.StringReader
+import scala.collection.Iterable
+import scala.collection.Seq
+import scala.xml.Utility.sort
+
+class XMLTestJVM2x {
+ @UnitTest
+ def t2354: Unit = {
+ val xml_good = "
"
+ val xml_bad = ""
+
+ val parser1 = ConstructingParser.fromSource(io.Source.fromString(xml_good), false)
+ val parser2 = ConstructingParser.fromSource(io.Source.fromString(xml_bad), false)
+
+ parser1.document()
+ parser2.document()
+ }
+
+ @UnitTest
+ def t8253: Unit = {
+ // `identity(foo)` used to match the overly permissive match in SymbolXMLBuilder
+ // which was intended to more specifically match `_root_.scala.xml.Text(...)`
+
+ import reflect.runtime.universe._ // not using the XML library in compiler tests
+
+ val ns1 = "ns1"
+ assertEquals(reify(ns1).tree.toString, q"ns1".toString)
+ assertEquals("",
+ """|{
+ | var $tmpscope: _root_.scala.xml.NamespaceBinding = $scope;
+ | $tmpscope = new _root_.scala.xml.NamespaceBinding(null, "ns1", $tmpscope);
+ | {
+ | val $scope: _root_.scala.xml.NamespaceBinding = $tmpscope;
+ | new _root_.scala.xml.Elem(null, "sample", _root_.scala.xml.Null, $scope, true)
+ | }
+ |}""".stripMargin,
+ q"".toString)
+ assertEquals("",
+ """|{
+ | var $tmpscope: _root_.scala.xml.NamespaceBinding = $scope;
+ | $tmpscope = new _root_.scala.xml.NamespaceBinding(null, ns1, $tmpscope);
+ | {
+ | val $scope: _root_.scala.xml.NamespaceBinding = $tmpscope;
+ | new _root_.scala.xml.Elem(null, "sample", _root_.scala.xml.Null, $scope, true)
+ | }
+ |}""".stripMargin,
+ q"".toString)
+ assertEquals("",
+ """|{
+ | var $tmpscope: _root_.scala.xml.NamespaceBinding = $scope;
+ | $tmpscope = new _root_.scala.xml.NamespaceBinding("foo", "ns1", $tmpscope);
+ | {
+ | val $scope: _root_.scala.xml.NamespaceBinding = $tmpscope;
+ | new _root_.scala.xml.Elem(null, "sample", _root_.scala.xml.Null, $scope, true)
+ | }
+ |}""".stripMargin,
+ q"".toString)
+ assertEquals("",
+ """|{
+ | var $tmpscope: _root_.scala.xml.NamespaceBinding = $scope;
+ | $tmpscope = new _root_.scala.xml.NamespaceBinding("foo", ns1, $tmpscope);
+ | {
+ | val $scope: _root_.scala.xml.NamespaceBinding = $tmpscope;
+ | new _root_.scala.xml.Elem(null, "sample", _root_.scala.xml.Null, $scope, true)
+ | }
+ |}""".stripMargin,
+ q"".toString)
+ }
+
+ @UnitTest
+ def t8466lift: Unit = {
+ import scala.reflect.runtime.universe._
+
+ implicit val liftXmlComment = Liftable[Comment] { comment =>
+ q"new _root_.scala.xml.Comment(${comment.commentText})"
+ }
+ liftXmlComment(Comment("foo"))
+ assertEquals(q"${Comment("foo")}".toString, q"".toString)
+ }
+
+ @UnitTest
+ def t8466unlift: Unit = {
+ import scala.reflect.runtime.universe._
+
+ implicit val unliftXmlComment = Unliftable[Comment] {
+ case q"new _root_.scala.xml.Comment(${value: String})" => Comment(value)
+ }
+ unliftXmlComment.unapply(q"")
+ val q"${comment: Comment}" = q""
+ assertEquals(comment.commentText, "foo")
+ }
+
+ @UnitTest
+ def t9027: Unit = {
+ // used to be parsed as .println
+
+ import reflect.runtime._, universe._
+
+ assertEquals(
+ """|{
+ | {
+ | val $buf = new _root_.scala.xml.NodeBuffer();
+ | $buf.$amp$plus(new _root_.scala.xml.Elem(null, "a", _root_.scala.xml.Null, $scope, true));
+ | $buf.$amp$plus(new _root_.scala.xml.Elem(null, "b", _root_.scala.xml.Null, $scope, true));
+ | $buf
+ | };
+ | println("hello, world.")
+ |}""".stripMargin,
+ q"""
+ println("hello, world.")""".toString)
+ assertEquals(
+ """|{
+ | {
+ | val $buf = new _root_.scala.xml.NodeBuffer();
+ | $buf.$amp$plus(new _root_.scala.xml.Elem(null, "a", _root_.scala.xml.Null, $scope, true));
+ | $buf.$amp$plus(new _root_.scala.xml.Elem(null, "b", _root_.scala.xml.Null, $scope, true));
+ | $buf.$amp$plus(new _root_.scala.xml.Elem(null, "c", _root_.scala.xml.Null, $scope, true));
+ | $buf
+ | };
+ | println("hello, world.")
+ |}""".stripMargin,
+ q"""
+
+
+ println("hello, world.")""".toString)
+ }
+}
diff --git a/jvm/src/test/scala/scala/xml/XMLSyntaxTest.scala b/jvm/src/test/scala/scala/xml/XMLSyntaxTest.scala
index 50dbf4a65..5030dcc04 100644
--- a/jvm/src/test/scala/scala/xml/XMLSyntaxTest.scala
+++ b/jvm/src/test/scala/scala/xml/XMLSyntaxTest.scala
@@ -16,7 +16,7 @@ class XMLSyntaxTestJVM {
case _ => super.replacementText(entityName);
}
}
- nextch; // !!important, to initialize the parser
+ nextch(); // !!important, to initialize the parser
}
val parsed = parser.element(TopScope) // parse the source as element
// alternatively, we could call document()
diff --git a/jvm/src/test/scala/scala/xml/XMLTest.scala b/jvm/src/test/scala/scala/xml/XMLTest.scala
index 8266d9b18..efdb8165a 100644
--- a/jvm/src/test/scala/scala/xml/XMLTest.scala
+++ b/jvm/src/test/scala/scala/xml/XMLTest.scala
@@ -281,10 +281,6 @@ class XMLTestJVM {
;
- def wsdlTemplate3(serviceName: String): Node =
-
- ;
-
def wsdlTemplate4(serviceName: String, targetNamespace: () => String): Node =
;
@@ -295,8 +291,6 @@ class XMLTestJVM {
""", wsdlTemplate1("service1") toString)
assertEquals("""
""", wsdlTemplate2("service2", "target2") toString)
- assertEquals("""
- """, wsdlTemplate3("service3") toString)
assertEquals("""
""", wsdlTemplate4("service4", () => "target4") toString)
}
@@ -328,7 +322,7 @@ class XMLTestJVM {
def t0663 = {
val src = scala.io.Source.fromString("")
val parser = xml.parsing.ConstructingParser.fromSource(src, true)
- assertEquals("", parser.document toString)
+ assertEquals("", parser.document() toString)
}
@UnitTest
@@ -367,18 +361,6 @@ class XMLTestJVM {
for (x1 <- xs; x2 <- xs) assertTrue(x1 xml_== x2)
}
- @UnitTest
- def t2354: Unit = {
- val xml_good = ""
- val xml_bad = ""
-
- val parser1 = ConstructingParser.fromSource(io.Source.fromString(xml_good), false)
- val parser2 = ConstructingParser.fromSource(io.Source.fromString(xml_bad), false)
-
- parser1.document
- parser2.document
- }
-
@UnitTest
def t2771 = {
val xml1 =
@@ -480,115 +462,6 @@ class XMLTestJVM {
assertEquals("""""", sort() toString)
}
- @UnitTest
- def t8253: Unit = {
- // `identity(foo)` used to match the overly permissive match in SymbolXMLBuilder
- // which was intended to more specifically match `_root_.scala.xml.Text(...)`
-
- import reflect.runtime.universe._ // not using the XML library in compiler tests
-
- val ns1 = "ns1"
- assertEquals(reify(ns1).tree.toString, q"ns1".toString)
- assertEquals("",
- """|{
- | var $tmpscope: _root_.scala.xml.NamespaceBinding = $scope;
- | $tmpscope = new _root_.scala.xml.NamespaceBinding(null, "ns1", $tmpscope);
- | {
- | val $scope: _root_.scala.xml.NamespaceBinding = $tmpscope;
- | new _root_.scala.xml.Elem(null, "sample", _root_.scala.xml.Null, $scope, true)
- | }
- |}""".stripMargin,
- q"".toString)
- assertEquals("",
- """|{
- | var $tmpscope: _root_.scala.xml.NamespaceBinding = $scope;
- | $tmpscope = new _root_.scala.xml.NamespaceBinding(null, ns1, $tmpscope);
- | {
- | val $scope: _root_.scala.xml.NamespaceBinding = $tmpscope;
- | new _root_.scala.xml.Elem(null, "sample", _root_.scala.xml.Null, $scope, true)
- | }
- |}""".stripMargin,
- q"".toString)
- assertEquals("",
- """|{
- | var $tmpscope: _root_.scala.xml.NamespaceBinding = $scope;
- | $tmpscope = new _root_.scala.xml.NamespaceBinding("foo", "ns1", $tmpscope);
- | {
- | val $scope: _root_.scala.xml.NamespaceBinding = $tmpscope;
- | new _root_.scala.xml.Elem(null, "sample", _root_.scala.xml.Null, $scope, true)
- | }
- |}""".stripMargin,
- q"".toString)
- assertEquals("",
- """|{
- | var $tmpscope: _root_.scala.xml.NamespaceBinding = $scope;
- | $tmpscope = new _root_.scala.xml.NamespaceBinding("foo", ns1, $tmpscope);
- | {
- | val $scope: _root_.scala.xml.NamespaceBinding = $tmpscope;
- | new _root_.scala.xml.Elem(null, "sample", _root_.scala.xml.Null, $scope, true)
- | }
- |}""".stripMargin,
- q"".toString)
- }
-
- @UnitTest
- def t8466lift: Unit = {
- import scala.reflect.runtime.universe._
-
- implicit val liftXmlComment = Liftable[Comment] { comment =>
- q"new _root_.scala.xml.Comment(${comment.commentText})"
- }
- liftXmlComment(Comment("foo"))
- assertEquals(q"${Comment("foo")}".toString, q"".toString)
- }
-
- @UnitTest
- def t8466unlift: Unit = {
- import scala.reflect.runtime.universe._
-
- implicit val unliftXmlComment = Unliftable[Comment] {
- case q"new _root_.scala.xml.Comment(${value: String})" => Comment(value)
- }
- unliftXmlComment.unapply(q"")
- val q"${comment: Comment}" = q""
- assertEquals(comment.commentText, "foo")
- }
-
- @UnitTest
- def t9027: Unit = {
- // used to be parsed as .println
-
- import reflect.runtime._, universe._
-
- assertEquals(
- """|{
- | {
- | val $buf = new _root_.scala.xml.NodeBuffer();
- | $buf.$amp$plus(new _root_.scala.xml.Elem(null, "a", _root_.scala.xml.Null, $scope, true));
- | $buf.$amp$plus(new _root_.scala.xml.Elem(null, "b", _root_.scala.xml.Null, $scope, true));
- | $buf
- | };
- | println("hello, world.")
- |}""".stripMargin,
- q"""
- println("hello, world.")""".toString)
- assertEquals(
- """|{
- | {
- | val $buf = new _root_.scala.xml.NodeBuffer();
- | $buf.$amp$plus(new _root_.scala.xml.Elem(null, "a", _root_.scala.xml.Null, $scope, true));
- | $buf.$amp$plus(new _root_.scala.xml.Elem(null, "b", _root_.scala.xml.Null, $scope, true));
- | $buf.$amp$plus(new _root_.scala.xml.Elem(null, "c", _root_.scala.xml.Null, $scope, true));
- | $buf
- | };
- | println("hello, world.")
- |}""".stripMargin,
- q"""
-
-
- println("hello, world.")""".toString)
- }
-
@UnitTest
def t9060 = {
val expected = """"""
@@ -637,7 +510,7 @@ class XMLTestJVM {
val sink = new PrintStream(new ByteArrayOutputStream())
(Console withOut sink) {
(Console withErr sink) {
- ConstructingParser.fromSource((io.Source fromString xml), true).document.docElem
+ ConstructingParser.fromSource((io.Source fromString xml), true).document().docElem
}
}
}
@@ -843,35 +716,35 @@ class XMLTestJVM {
def xmlProcInstrTest: Unit = {
val x = xml.parsing.ConstructingParser.fromSource(toSource("aa"), false)
- assertEquals(new UnprefixedAttribute("aa", Text(""), Null), x.xmlProcInstr)
+ assertEquals(new UnprefixedAttribute("aa", Text(""), Null), x.xmlProcInstr())
}
@UnitTest(expected = classOf[FatalError])
def notationDeclFailure: Unit = {
val x = xml.parsing.ConstructingParser.fromSource(toSource(""), false)
- x.notationDecl
+ x.notationDecl()
}
@UnitTest
def pubidLiteralTest: Unit = {
val x = xml.parsing.ConstructingParser.fromSource(toSource(""), false)
- assertEquals("", x.pubidLiteral)
+ assertEquals("", x.pubidLiteral())
}
@UnitTest
def xAttributeValueTest: Unit = {
val x = xml.parsing.ConstructingParser.fromSource(toSource("'"), false)
- assertEquals("", x.xAttributeValue)
+ assertEquals("", x.xAttributeValue())
}
@UnitTest
def xEntityValueTest: Unit = {
val x = xml.parsing.ConstructingParser.fromSource(toSource(""), false)
- assertEquals("", x.xEntityValue)
+ assertEquals("", x.xEntityValue())
}
}
diff --git a/jvm/src/test/scala/scala/xml/parsing/ConstructingParserTest.scala b/jvm/src/test/scala/scala/xml/parsing/ConstructingParserTest.scala
index 7dfa33b6b..413cd9a74 100644
--- a/jvm/src/test/scala/scala/xml/parsing/ConstructingParserTest.scala
+++ b/jvm/src/test/scala/scala/xml/parsing/ConstructingParserTest.scala
@@ -46,7 +46,7 @@ class ConstructingParserTest {
override def reportError(pos: Int, msg: String, out: java.io.PrintStream = Console.err) = {}
}
- val doc = ConstructingParser.fromSource(source, true).document
+ val doc = ConstructingParser.fromSource(source, true).document()
assertEquals(expected, doc.theSeq)
}
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 8920d978b..12b171d4e 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -6,3 +6,4 @@ val scalaJSVersion =
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.0")
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.0.0")
+addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.3.1")
diff --git a/shared/src/main/scala/scala/xml/Elem.scala b/shared/src/main/scala/scala/xml/Elem.scala
index f641ff7bd..cf156ed63 100755
--- a/shared/src/main/scala/scala/xml/Elem.scala
+++ b/shared/src/main/scala/scala/xml/Elem.scala
@@ -53,7 +53,7 @@ object Elem {
implicit def xmlToProcess(command: scala.xml.Elem): ProcessBuilder = Process(command.text.trim)
@deprecated("To create a scala.sys.process.Process from an xml.Elem, please use Process(elem.text.trim).", "2.11.0")
- implicit def processXml(p: Process.type) = new {
+ implicit def processXml(p: Process.type): { def apply(command: Elem): ProcessBuilder } = new {
/**
* Creates a [[scala.sys.process.ProcessBuilder]] from a Scala XML Element.
* This can be used as a way to template strings.
diff --git a/shared/src/main/scala/scala/xml/Utility.scala b/shared/src/main/scala/scala/xml/Utility.scala
index 9374ff990..776da5a7a 100755
--- a/shared/src/main/scala/scala/xml/Utility.scala
+++ b/shared/src/main/scala/scala/xml/Utility.scala
@@ -24,7 +24,7 @@ object Utility extends AnyRef with parsing.TokenTests {
// [Martin] This looks dubious. We don't convert StringBuilders to
// Strings anywhere else, why do it here?
- implicit def implicitSbToString(sb: StringBuilder) = sb.toString()
+ implicit def implicitSbToString(sb: StringBuilder): String = sb.toString()
// helper for the extremely oft-repeated sequence of creating a
// StringBuilder, passing it around, and then grabbing its String.
diff --git a/shared/src/test/scala-2.x/scala/xml/ShouldCompile.scala b/shared/src/test/scala-2.x/scala/xml/ShouldCompile.scala
new file mode 100644
index 000000000..d1aab6826
--- /dev/null
+++ b/shared/src/test/scala-2.x/scala/xml/ShouldCompile.scala
@@ -0,0 +1,13 @@
+package scala.xml
+
+// these tests depend on xml, so they ended up here,
+// though really they are compiler tests
+
+import scala.collection._
+import scala.collection.mutable.ArrayBuffer
+
+// t1626
+object o {
+ val n =
+ n.namespace == null
+}
diff --git a/shared/src/test/scala/scala/xml/TransformersTest.scala b/shared/src/test/scala-2.x/scala/xml/TransformersTest.scala
similarity index 100%
rename from shared/src/test/scala/scala/xml/TransformersTest.scala
rename to shared/src/test/scala-2.x/scala/xml/TransformersTest.scala
diff --git a/shared/src/test/scala-2.x/scala/xml/XMLTest2x.scala b/shared/src/test/scala-2.x/scala/xml/XMLTest2x.scala
new file mode 100644
index 000000000..aa01266fa
--- /dev/null
+++ b/shared/src/test/scala-2.x/scala/xml/XMLTest2x.scala
@@ -0,0 +1,42 @@
+package scala.xml
+
+import language.postfixOps
+
+import org.junit.{Test => UnitTest}
+import org.junit.Assert.assertTrue
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertEquals
+import scala.xml.parsing.ConstructingParser
+import java.io.StringWriter
+import java.io.ByteArrayOutputStream
+import java.io.StringReader
+import scala.collection.Iterable
+import scala.collection.Seq
+import scala.xml.Utility.sort
+
+class XMLTest2x {
+ // t-486
+ def wsdlTemplate3(serviceName: String): Node =
+
+ ;
+
+ @UnitTest
+ def wsdl = {
+ assertEquals("""
+ """, wsdlTemplate3("service3") toString)
+ }
+
+ @UnitTest
+ def t5154: Unit = {
+
+ // extra space made the pattern OK
+ def f = {{3}} match { case {{3}} => true }
+
+ // lack of space used to error: illegal start of simple pattern
+ def g = {{3}} match { case {{3}} => true }
+
+ assertTrue(f)
+ assertTrue(g)
+ }
+
+}
diff --git a/shared/src/test/scala/scala/xml/PatternMatchingTest.scala b/shared/src/test/scala/scala/xml/PatternMatchingTest.scala
index 6f241464a..2fce27208 100644
--- a/shared/src/test/scala/scala/xml/PatternMatchingTest.scala
+++ b/shared/src/test/scala/scala/xml/PatternMatchingTest.scala
@@ -5,7 +5,7 @@ import org.junit.Test
import org.junit.Assert.assertTrue
import org.junit.Assert.assertEquals
-class PatternMatchingTest extends {
+class PatternMatchingTest {
@Test
def unprefixedAttribute: Unit = {
val li = List("1", "2", "3", "4")
diff --git a/shared/src/test/scala/scala/xml/ShouldCompile.scala b/shared/src/test/scala/scala/xml/ShouldCompile.scala
index c05bdc503..3ba589a90 100644
--- a/shared/src/test/scala/scala/xml/ShouldCompile.scala
+++ b/shared/src/test/scala/scala/xml/ShouldCompile.scala
@@ -6,12 +6,6 @@ package scala.xml
import scala.collection._
import scala.collection.mutable.ArrayBuffer
-// t1626
-object o {
- val n =
- n.namespace == null
-}
-
// t1761
class Foo {
val elements: Seq[Node] = Nil
diff --git a/shared/src/test/scala/scala/xml/XMLTest.scala b/shared/src/test/scala/scala/xml/XMLTest.scala
index 93e443119..3a8c42917 100644
--- a/shared/src/test/scala/scala/xml/XMLTest.scala
+++ b/shared/src/test/scala/scala/xml/XMLTest.scala
@@ -359,10 +359,6 @@ Ours is the portal of hope, come as you are."
;
- def wsdlTemplate3(serviceName: String): Node =
-
- ;
-
def wsdlTemplate4(serviceName: String, targetNamespace: () => String): Node =
;
@@ -373,8 +369,6 @@ Ours is the portal of hope, come as you are."
""", wsdlTemplate1("service1") toString)
assertEquals("""
""", wsdlTemplate2("service2", "target2") toString)
- assertEquals("""
- """, wsdlTemplate3("service3") toString)
assertEquals("""
""", wsdlTemplate4("service4", () => "target4") toString)
}
@@ -479,19 +473,6 @@ Ours is the portal of hope, come as you are."
assertHonorsIterableContract(.attributes)
}
- @UnitTest
- def t5154: Unit = {
-
- // extra space made the pattern OK
- def f = {{3}} match { case {{3}} => true }
-
- // lack of space used to error: illegal start of simple pattern
- def g = {{3}} match { case {{3}} => true }
-
- assertTrue(f)
- assertTrue(g)
- }
-
@UnitTest
def t5843: Unit = {
val foo = scala.xml.Attribute(null, "foo", "1", scala.xml.Null)