@@ -639,48 +639,47 @@ class XMLTestJVM {
639
639
assertEquals(" <node>\n <leaf/>\n </node>" , pp.format(x))
640
640
}
641
641
642
- @ UnitTest (expected = classOf [FatalError ])
643
- def shouldThrowFatalErrorWhenCantFindRequestedXToken {
644
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/>" ), false )
642
+ def xTokenFailure {
643
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" a" ), false )
645
644
646
- x.xToken('b' )
645
+ assertEquals( Seq .empty[ Char ], x.xToken('b' ) )
647
646
}
648
647
649
648
@ UnitTest (expected = classOf [FatalError ])
650
- def shouldThrowFatalErrorWhenCantFindRequestedXCharData {
651
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
649
+ def xCharDataFailure {
650
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" " ), false )
652
651
653
652
x.xCharData
654
653
}
655
654
656
655
@ UnitTest (expected = classOf [FatalError ])
657
- def shouldThrowFatalErrorWhenCantFindRequestedXComment {
658
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
656
+ def xCommentFailure {
657
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" " ), false )
659
658
660
659
x.xComment
661
660
}
662
661
663
662
@ UnitTest (expected = classOf [FatalError ])
664
- def shouldThrowFatalErrorWhenCantFindRequestedXmlProcInstr {
665
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
663
+ def xmlProcInstrFailure {
664
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" aa " ), false )
666
665
667
- x.xmlProcInstr()
666
+ x.xmlProcInstr
668
667
}
669
668
670
669
@ Ignore (" Ignored for future fix, currently throw OOE because of infinity MarkupParserCommon:66" )
671
670
@ UnitTest (expected = classOf [FatalError ])
672
- def shouldThrowFatalErrorWhenCantFindRequestedXAttributeValue {
673
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
671
+ def xAttributeValueFailure {
672
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" " ), false )
674
673
675
- x.xAttributeValue()
674
+ x.xAttributeValue
676
675
}
677
676
678
677
@ Ignore (" Ignored for future fix, currently return unexpected result" )
679
678
@ UnitTest (expected = classOf [FatalError ])
680
- def shouldThrowFatalErrorWhenCantFindRequestedXEntityValue {
681
- val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" <a/> " ), false )
679
+ def xEntityValueFailure {
680
+ val x = xml.parsing.ConstructingParser .fromSource(io.Source .fromString(" " ), false )
682
681
683
- assertEquals( " a/> " , x.xEntityValue())
682
+ x.xEntityValue
684
683
}
685
684
686
685
}
0 commit comments