File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
scalactic-macro/src/main/scala/org/scalactic/anyvals
scalactic-test/src/test/scala/org/scalactic/anyvals
scalatest/src/main/scala/org/scalatest Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1531,7 +1531,7 @@ final class NumericString private (val value: String) extends AnyVal {
1531
1531
* returns a single string for `NumericString`.
1532
1532
*/
1533
1533
def lines : Iterator [String ] =
1534
- value.lines
1534
+ value.linesIterator
1535
1535
1536
1536
/** Return all lines in this `NumericString` in an iterator,
1537
1537
* including trailing line end characters. Always returns a
Original file line number Diff line number Diff line change @@ -1318,7 +1318,7 @@ class NumericStringSpec extends FunSpec with Matchers with GeneratorDrivenProper
1318
1318
it(" should offer a lines method consistent with StringOps" ) {
1319
1319
forAll { (numStr : NumericString ) =>
1320
1320
numStr.lines.mkString(" ," ) shouldEqual
1321
- numStr.value.lines .mkString(" ," )
1321
+ numStr.value.linesIterator .mkString(" ," )
1322
1322
}
1323
1323
}
1324
1324
it(" should offer a linesWithSeparators method consistent with StringOps" ) {
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ println("&&&&&&&&&&&")
144
144
145
145
private [scalatest] def getSnippets (text : String ): Vector [Snippet ] = {
146
146
// println("text: " + text)
147
- val lines = Vector .empty ++ text.lines .toIterable
147
+ val lines = Vector .empty ++ text.linesIterator .toIterable
148
148
// println("lines: " + lines)
149
149
val pairs = lines map { line =>
150
150
val trimmed = line.trim
@@ -186,7 +186,7 @@ println("&&&&&&&&&&&")
186
186
private [scalatest] object Doc {
187
187
188
188
private [scalatest] def trimMarkup (text : String ): String = {
189
- val lines = text.lines .toList
189
+ val lines = text.linesIterator .toList
190
190
val zipLines = lines.zipWithIndex
191
191
val firstNonWhiteLine = zipLines.find { case (line, _) => ! line.trim.isEmpty }
192
192
val lastNonWhiteLine = zipLines.reverse.find { case (line, _) => ! line.trim.isEmpty }
@@ -197,7 +197,7 @@ private[scalatest] object Doc {
197
197
}
198
198
199
199
private [scalatest] def stripMargin (text : String ): String = {
200
- val lines = text.lines .toList
200
+ val lines = text.linesIterator .toList
201
201
val firstNonWhiteLine = lines.find(! _.trim.isEmpty)
202
202
firstNonWhiteLine match {
203
203
case None => text.trim
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ private[scalatest] abstract class DocSpec extends DocSpecLike {
41
41
private [scalatest] object DocSpec {
42
42
43
43
def trimMarkup (text : String ): String = {
44
- val lines = text.lines .toList
44
+ val lines = text.linesIterator .toList
45
45
val zipLines = lines.zipWithIndex
46
46
val firstNonWhiteLine = zipLines.find { case (line, _) => ! line.trim.isEmpty }
47
47
val lastNonWhiteLine = zipLines.reverse.find { case (line, _) => ! line.trim.isEmpty }
@@ -52,7 +52,7 @@ private[scalatest] object DocSpec {
52
52
}
53
53
54
54
def stripMargin (text : String ): String = {
55
- val lines = text.lines .toList
55
+ val lines = text.linesIterator .toList
56
56
val firstNonWhiteLine = lines.find(! _.trim.isEmpty)
57
57
firstNonWhiteLine match {
58
58
case None => text.trim
You can’t perform that action at this time.
0 commit comments