@@ -767,47 +767,46 @@ class XMLTestJVM {
767
767
}
768
768
769
769
@ UnitTest (expected = classOf [FatalError ])
770
- def shouldThrowFatalErrorWhenCantFindRequestedXToken {
771
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/>" ), false )
772
-
773
- x.xToken('b' )
770
+ def xTokenFailure {
771
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" a" ), false )
772
+ assertEquals((): Unit , x.xToken('b' ))
774
773
}
775
774
776
775
@ UnitTest (expected = classOf [FatalError ])
777
- def shouldThrowFatalErrorWhenCantFindRequestedXCharData {
778
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
776
+ def xCharDataFailure {
777
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" " ), false )
779
778
780
779
x.xCharData
781
780
}
782
781
783
782
@ UnitTest (expected = classOf [FatalError ])
784
- def shouldThrowFatalErrorWhenCantFindRequestedXComment {
785
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
783
+ def xCommentFailure {
784
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" " ), false )
786
785
787
786
x.xComment
788
787
}
789
788
790
789
@ UnitTest (expected = classOf [FatalError ])
791
- def shouldThrowFatalErrorWhenCantFindRequestedXmlProcInstr {
792
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
790
+ def xmlProcInstrFailure {
791
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" aa " ), false )
793
792
794
- x.xmlProcInstr( )
793
+ assertEquals( new UnprefixedAttribute ( " aa " , Text ( " " ), Null ), x.xmlProcInstr)
795
794
}
796
795
797
796
@ Ignore (" Ignored for future fix, currently throw OOE because of infinity MarkupParserCommon:66" )
798
797
@ UnitTest (expected = classOf [FatalError ])
799
- def shouldThrowFatalErrorWhenCantFindRequestedXAttributeValue {
800
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
798
+ def xAttributeValueFailure {
799
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" " ), false )
801
800
802
- x.xAttributeValue()
801
+ x.xAttributeValue
803
802
}
804
803
805
804
@ Ignore (" Ignored for future fix, currently return unexpected result" )
806
805
@ UnitTest (expected = classOf [FatalError ])
807
- def shouldThrowFatalErrorWhenCantFindRequestedXEntityValue {
808
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
806
+ def xEntityValueFailure {
807
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" " ), false )
809
808
810
- assertEquals( " a/> " , x.xEntityValue())
809
+ x.xEntityValue
811
810
}
812
811
813
812
}
0 commit comments