Skip to content

Commit 6c13153

Browse files
committed
Add property test for XMLLoader.load(_: InputSource)
1 parent ab70b7a commit 6c13153

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: src/test/scala/scala/xml/factory/XMLLoaderSpec.scala

+12
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ object XMLLoaderSpec extends PropertiesFor("factory.XMLLoader")
118118
builder.toString
119119
}
120120

121+
implicit def prettyInputSource(is: InputSource) =
122+
prettyInputStream(is.getByteStream)
123+
121124
// FIXME: xerces.internal.impl.io.MalformedByteSequenceException:
122125
// Invalid byte 1 of 1-byte UTF-8 sequence.
123126
// property("load(_: java.io.InputStream)") = {
@@ -127,6 +130,15 @@ object XMLLoaderSpec extends PropertiesFor("factory.XMLLoader")
127130
// }
128131
// }
129132

133+
// FIXME: xerces.internal.impl.io.MalformedByteSequenceException:
134+
// Invalid byte 1 of 1-byte UTF-8 sequence.
135+
// property("load(_: InputSource)") = {
136+
// Prop.forAll { is: InputSource =>
137+
// loader.load(is)
138+
// Prop.passed
139+
// }
140+
// }
141+
130142
property("loadString(_: String)") = {
131143
// Use forAllNoShrink since Scalacheck's shrinking strategy for a
132144
// string, removing characters byte-by-byte, won't improve the

0 commit comments

Comments
 (0)