@@ -30,7 +30,7 @@ object XMLLoaderSpec extends PropertiesFor("factory.XMLLoader")
30
30
override def parser = testParser
31
31
}
32
32
33
- val xmlLoaderGen : Gen [XMLLoader [Elem ]] =
33
+ val genXMLLoader : Gen [XMLLoader [Elem ]] =
34
34
Gen .const(
35
35
loader
36
36
)
@@ -40,7 +40,7 @@ object XMLLoaderSpec extends PropertiesFor("factory.XMLLoader")
40
40
val writer : java.io.Writer
41
41
)
42
42
43
- val streamAndWriterGen : Gen [StreamAndWriter ] = for {
43
+ val genStreamAndWriter : Gen [StreamAndWriter ] = for {
44
44
out <- Gen .delay(new java.io.ByteArrayOutputStream )
45
45
} yield {
46
46
new StreamAndWriter (
@@ -53,10 +53,10 @@ object XMLLoaderSpec extends PropertiesFor("factory.XMLLoader")
53
53
}
54
54
55
55
implicit val arbStreamAndWriter = Arbitrary {
56
- streamAndWriterGen
56
+ genStreamAndWriter
57
57
}
58
58
59
- val inputStreamGen : Gen [java.io.InputStream ] = for {
59
+ val genInputStream : Gen [java.io.InputStream ] = for {
60
60
inOut <- Arbitrary .arbitrary[StreamAndWriter ]
61
61
document <- Arbitrary .arbitrary[Document ]
62
62
encoding <- Gen .const(" UTF-8" ) // java.nio.charset.StandardCharsets.UTF_8.name
@@ -77,22 +77,22 @@ object XMLLoaderSpec extends PropertiesFor("factory.XMLLoader")
77
77
minimizeTags
78
78
)
79
79
inOut.writer.flush()
80
- val str = inOut.stream.toString(encoding)
80
+ val str = inOut.stream.toString
81
81
new java.io.StringBufferInputStream (str)
82
82
}
83
83
84
84
implicit val arbInputStream = Arbitrary {
85
- inputStreamGen
85
+ genInputStream
86
86
}
87
87
88
- val inputSourceGen : Gen [InputSource ] = for {
88
+ val genInputSource : Gen [InputSource ] = for {
89
89
is <- Arbitrary .arbitrary[java.io.InputStream ]
90
90
} yield {
91
91
Source .fromInputStream(is)
92
92
}
93
93
94
94
implicit val arbInputSource = Arbitrary {
95
- inputSourceGen
95
+ genInputSource
96
96
}
97
97
98
98
property(" adapter" ) = {
@@ -134,7 +134,7 @@ object XMLLoaderSpec extends PropertiesFor("factory.XMLLoader")
134
134
// while shrinking since Xerces only throws a SAXParseException,
135
135
// albeit with different message values, but Scalacheck doesn't
136
136
// listen to them.
137
- Prop .forAllNoShrink(xmlStringGen ) { xml : String =>
137
+ Prop .forAllNoShrink(genXmlString ) { xml : String =>
138
138
loader.loadString(xml)
139
139
Prop .passed
140
140
}
0 commit comments