@@ -749,48 +749,47 @@ class XMLTestJVM {
749
749
assertEquals(" <node>\n <leaf/>\n </node>" , pp.format(x))
750
750
}
751
751
752
- @ UnitTest (expected = classOf [FatalError ])
753
- def shouldThrowFatalErrorWhenCantFindRequestedXToken {
754
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/>" ), false )
752
+ def xTokenFailure {
753
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" a" ), false )
755
754
756
- x.xToken('b' )
755
+ assertEquals( Seq .empty[ Char ], x.xToken('b' ) )
757
756
}
758
757
759
758
@ UnitTest (expected = classOf [FatalError ])
760
- def shouldThrowFatalErrorWhenCantFindRequestedXCharData {
761
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
759
+ def xCharDataFailure {
760
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" " ), false )
762
761
763
762
x.xCharData
764
763
}
765
764
766
765
@ UnitTest (expected = classOf [FatalError ])
767
- def shouldThrowFatalErrorWhenCantFindRequestedXComment {
768
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
766
+ def xCommentFailure {
767
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" " ), false )
769
768
770
769
x.xComment
771
770
}
772
771
773
772
@ UnitTest (expected = classOf [FatalError ])
774
- def shouldThrowFatalErrorWhenCantFindRequestedXmlProcInstr {
775
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
773
+ def xmlProcInstrFailure {
774
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" aa " ), false )
776
775
777
- x.xmlProcInstr()
776
+ x.xmlProcInstr
778
777
}
779
778
780
779
@ Ignore (" Ignored for future fix, currently throw OOE because of infinity MarkupParserCommon:66" )
781
780
@ UnitTest (expected = classOf [FatalError ])
782
- def shouldThrowFatalErrorWhenCantFindRequestedXAttributeValue {
783
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
781
+ def xAttributeValueFailure {
782
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" " ), false )
784
783
785
- x.xAttributeValue()
784
+ x.xAttributeValue
786
785
}
787
786
788
787
@ Ignore (" Ignored for future fix, currently return unexpected result" )
789
788
@ UnitTest (expected = classOf [FatalError ])
790
- def shouldThrowFatalErrorWhenCantFindRequestedXEntityValue {
791
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
789
+ def xEntityValueFailure {
790
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" " ), false )
792
791
793
- assertEquals( " a/> " , x.xEntityValue())
792
+ x.xEntityValue
794
793
}
795
794
796
795
}
0 commit comments