File tree Expand file tree Collapse file tree 3 files changed +6
-17
lines changed
simple-linked-list/src/test/scala Expand file tree Collapse file tree 3 files changed +6
-17
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -47,12 +47,12 @@ object Sgf extends RegexParsers {
4747
4848 private val propValue : Parser [String ] =
4949 " [" ~ rep1(propValuePart) ~ " ]" ^^ {
50- case _ ~ values ~ _ => values mkString
50+ case _ ~ values ~ _ => values. mkString
5151 } named " propValue"
5252
5353 private val propValuePart : Parser [String ] = {
5454 implicit class AsStringParser (self : String ) { def p : Parser [String ] = self }
55- val ignore = const(" " ) _
55+ val ignore = const(" " )
5656
5757 val escapedNewline : Parser [String ] = " \\\n " .p ^^ ignore
5858 val escapedChar : Parser [String ] = """ \\ .""" .r ^^ (_.takeRight(1 ))
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ class SimpleLinkedListTest extends AnyFlatSpec with Matchers with ScalaCheckDriv
7272
7373 it should " handle reverse arbitrary list " in {
7474 pending
75- forAll { seq : Seq [Int ] =>
75+ forAll { ( seq : Seq [Int ]) =>
7676 assert(SimpleLinkedList .fromSeq(seq).reverse.toSeq == seq.reverse)
7777 }
7878 }
@@ -90,7 +90,7 @@ class SimpleLinkedListTest extends AnyFlatSpec with Matchers with ScalaCheckDriv
9090 (0 until i).foldLeft(list)((acc, j) => acc.next).value
9191 }
9292
93- forAll { xs : Seq [Int ] =>
93+ forAll { ( xs : Seq [Int ]) =>
9494 whenever(xs.nonEmpty) {
9595 val list = SimpleLinkedList .fromSeq(xs)
9696 xs.indices.foreach {
@@ -102,15 +102,15 @@ class SimpleLinkedListTest extends AnyFlatSpec with Matchers with ScalaCheckDriv
102102
103103 it should " return original arbitrary list from added list elements" in {
104104 pending
105- forAll { xs : Seq [Int ] =>
105+ forAll { ( xs : Seq [Int ]) =>
106106 val list = xs.foldLeft(SimpleLinkedList [Int ]())(_.add(_))
107107 assert(list.toSeq == xs)
108108 }
109109 }
110110
111111 it should " handle arbitrary generics" in {
112112 pending
113- forAll { xs : Seq [String ] =>
113+ forAll { ( xs : Seq [String ]) =>
114114 assert(SimpleLinkedList .fromSeq(xs).toSeq == xs)
115115 }
116116 }
You can’t perform that action at this time.
0 commit comments