Skip to content

Commit f7f9597

Browse files
fix sgf and linked list exercise
1 parent f231d05 commit f7f9597

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

bin/test-in-docker

Lines changed: 0 additions & 11 deletions
This file was deleted.

exercises/practice/sgf-parsing/.meta/Example.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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))

exercises/practice/simple-linked-list/src/test/scala/SimpleLinkedListTest.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)