diff --git a/jvm/src/test/scala/scala/xml/XMLTest.scala b/jvm/src/test/scala/scala/xml/XMLTest.scala
index f1b3b3536..ed72de82e 100644
--- a/jvm/src/test/scala/scala/xml/XMLTest.scala
+++ b/jvm/src/test/scala/scala/xml/XMLTest.scala
@@ -639,48 +639,47 @@ class XMLTestJVM {
assertEquals("\n \n", pp.format(x))
}
- @UnitTest(expected = classOf[FatalError])
- def shouldThrowFatalErrorWhenCantFindRequestedXToken {
- val x = xml.parsing.ConstructingParser.fromSource(io.Source.fromString(""), false)
+ def xTokenFailure {
+ val x = xml.parsing.ConstructingParser.fromSource(io.Source.fromString("a"), false)
- x.xToken('b')
+ assertEquals(Seq.empty[Char], x.xToken('b'))
}
@UnitTest(expected = classOf[FatalError])
- def shouldThrowFatalErrorWhenCantFindRequestedXCharData {
- val x = xml.parsing.ConstructingParser.fromSource(io.Source.fromString(""), false)
+ def xCharDataFailure {
+ val x = xml.parsing.ConstructingParser.fromSource(io.Source.fromString(""), false)
x.xCharData
}
@UnitTest(expected = classOf[FatalError])
- def shouldThrowFatalErrorWhenCantFindRequestedXComment {
- val x = xml.parsing.ConstructingParser.fromSource(io.Source.fromString(""), false)
+ def xCommentFailure {
+ val x = xml.parsing.ConstructingParser.fromSource(io.Source.fromString(""), false)
x.xComment
}
@UnitTest(expected = classOf[FatalError])
- def shouldThrowFatalErrorWhenCantFindRequestedXmlProcInstr {
- val x = xml.parsing.ConstructingParser.fromSource(io.Source.fromString(""), false)
+ def xmlProcInstrFailure {
+ val x = xml.parsing.ConstructingParser.fromSource(io.Source.fromString("aa"), false)
- x.xmlProcInstr()
+ x.xmlProcInstr
}
@Ignore("Ignored for future fix, currently throw OOE because of infinity MarkupParserCommon:66")
@UnitTest(expected = classOf[FatalError])
- def shouldThrowFatalErrorWhenCantFindRequestedXAttributeValue {
- val x = xml.parsing.ConstructingParser.fromSource(io.Source.fromString(""), false)
+ def xAttributeValueFailure {
+ val x = xml.parsing.ConstructingParser.fromSource(io.Source.fromString(""), false)
- x.xAttributeValue()
+ x.xAttributeValue
}
@Ignore("Ignored for future fix, currently return unexpected result")
@UnitTest(expected = classOf[FatalError])
- def shouldThrowFatalErrorWhenCantFindRequestedXEntityValue {
- val x = xml.parsing.ConstructingParser.fromSource(io.Source.fromString(""), false)
+ def xEntityValueFailure {
+ val x = xml.parsing.ConstructingParser.fromSource(io.Source.fromString(""), false)
- assertEquals("a/>", x.xEntityValue())
+ x.xEntityValue
}
}