Skip to content

Commit e0c9bdb

Browse files
authored
Merge pull request #389 from xuwei-k/parentheses
add parentheses. prepare Scala 3
2 parents e78f3a1 + 1dfbdfd commit e0c9bdb

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

cats/shared/src/test/scala/kantan/csv/cats/ErrorTests.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,23 @@ class ErrorTests extends DisciplineSuite {
3737
checkAll("ParseError.IOError", EqTests[ParseError.IOError].eqv)
3838

3939
test("Show[DecodeError.OutOfBounds] should yield a string containing the expected index") {
40-
forAll { error: DecodeError.OutOfBounds =>
40+
forAll { (error: DecodeError.OutOfBounds) =>
4141
Show[DecodeError.OutOfBounds].show(error) should include(error.index.toString)
4242
Show[DecodeError].show(error) should include(error.index.toString)
4343
Show[ReadError].show(error) should include(error.index.toString)
4444
}
4545
}
4646

4747
test("Show[DecodeError.TypeError] should yield a string containing the expected message") {
48-
forAll { error: DecodeError.TypeError =>
48+
forAll { (error: DecodeError.TypeError) =>
4949
Show[DecodeError.TypeError].show(error) should include(error.message)
5050
Show[DecodeError].show(error) should include(error.message)
5151
Show[ReadError].show(error) should include(error.message)
5252
}
5353
}
5454

5555
test("Show[ParseError.IOError] should yield a string containing the expected message") {
56-
forAll { error: ParseError.IOError =>
56+
forAll { (error: ParseError.IOError) =>
5757
Show[ParseError.IOError].show(error) should include(error.message)
5858
Show[ParseError].show(error) should include(error.message)
5959
Show[ReadError].show(error) should include(error.message)

core/shared/src/test/scala/kantan/csv/DecodeResultTests.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,25 @@ import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
2424
@SuppressWarnings(Array("org.wartremover.warts.Throw"))
2525
class DecodeResultTests extends AnyFunSuite with ScalaCheckPropertyChecks with Matchers {
2626
test("DecodeResult.success should return a Right") {
27-
forAll { i: Int =>
27+
forAll { (i: Int) =>
2828
DecodeResult.success(i) should be(Right(i))
2929
}
3030
}
3131

3232
test("DecodeResult.apply should return a Right on 'good' values") {
33-
forAll { i: Int =>
33+
forAll { (i: Int) =>
3434
DecodeResult(i) should be(Right(i))
3535
}
3636
}
3737

3838
test("DecodeResult.apply should return a Left on 'bad' values") {
39-
forAll { e: Exception =>
39+
forAll { (e: Exception) =>
4040
DecodeResult(throw e) should be(Left(DecodeError.TypeError(e)))
4141
}
4242
}
4343

4444
test("DecodeResult.outOfBounds should return a Left") {
45-
forAll { i: Int =>
45+
forAll { (i: Int) =>
4646
DecodeResult.outOfBounds(i) should be(Left(DecodeError.OutOfBounds(i)))
4747
}
4848
}

core/shared/src/test/scala/kantan/csv/ParseResultTests.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
2424
@SuppressWarnings(Array("org.wartremover.warts.Throw"))
2525
class ParseResultTests extends AnyFunSuite with ScalaCheckPropertyChecks with Matchers {
2626
test("ParseResult.success should return a Right") {
27-
forAll { i: Int =>
27+
forAll { (i: Int) =>
2828
ParseResult.success(i) should be(Right(i))
2929
}
3030
}
3131

3232
test("ParseResult.apply should return a Right on 'good' values") {
33-
forAll { i: Int =>
33+
forAll { (i: Int) =>
3434
ParseResult(i) should be(Right(i))
3535
}
3636
}
3737

3838
test("ParseResult.apply should return a Left on 'bad' values") {
39-
forAll { e: Exception =>
39+
forAll { (e: Exception) =>
4040
ParseResult(throw e) should be(Left(ParseError.IOError(e)))
4141
}
4242
}

core/shared/src/test/scala/kantan/csv/ops/CsvSourceOpsTests.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class CsvSourceOpsTests extends AnyFunSuite with ScalaCheckPropertyChecks with M
4141
}
4242

4343
test("CsvSource instances should have a working asCsvReader method") {
44-
forAll { data: List[RowValue[TestCase]] =>
44+
forAll { (data: List[RowValue[TestCase]]) =>
4545
compare(
4646
asCsv(data, rfc)
4747
.asCsvReader[TestCase](rfc)
@@ -52,7 +52,7 @@ class CsvSourceOpsTests extends AnyFunSuite with ScalaCheckPropertyChecks with M
5252
}
5353

5454
test("CsvSource instances should have a working readCsv method") {
55-
forAll { data: List[RowValue[TestCase]] =>
55+
forAll { (data: List[RowValue[TestCase]]) =>
5656
compare(
5757
asCsv(data, rfc)
5858
.readCsv[List, TestCase](rfc),
@@ -78,7 +78,7 @@ class CsvSourceOpsTests extends AnyFunSuite with ScalaCheckPropertyChecks with M
7878
}
7979

8080
test("CsvSource instances should have a working asUnsafeCsvReader method") {
81-
forAll { data: List[RowValue[TestCase]] =>
81+
forAll { (data: List[RowValue[TestCase]]) =>
8282
compareUnsafe(
8383
asCsv(data, rfc)
8484
.asUnsafeCsvReader[TestCase](rfc)
@@ -89,7 +89,7 @@ class CsvSourceOpsTests extends AnyFunSuite with ScalaCheckPropertyChecks with M
8989
}
9090

9191
test("CsvSource instances should have a working unsafeReadCsv method") {
92-
forAll { data: List[RowValue[TestCase]] =>
92+
forAll { (data: List[RowValue[TestCase]]) =>
9393
compareUnsafe(
9494
asCsv(data, rfc)
9595
.unsafeReadCsv[List, TestCase](rfc),

scalaz/shared/src/test/scala/kantan/csv/scalaz/ErrorTests.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,23 @@ class ErrorTests extends ScalazDisciplineSuite {
3737
checkAll("ParseError.IOError", equ.laws[ParseError.IOError])
3838

3939
test("Show[DecodeError.OutOfBounds] should yield a string containing the expected index") {
40-
forAll { error: DecodeError.OutOfBounds =>
40+
forAll { (error: DecodeError.OutOfBounds) =>
4141
Show[DecodeError.OutOfBounds].shows(error) should include(error.index.toString)
4242
Show[DecodeError].shows(error) should include(error.index.toString)
4343
Show[ReadError].shows(error) should include(error.index.toString)
4444
}
4545
}
4646

4747
test("Show[DecodeError.TypeError] should yield a string containing the expected message") {
48-
forAll { error: DecodeError.TypeError =>
48+
forAll { (error: DecodeError.TypeError) =>
4949
Show[DecodeError.TypeError].shows(error) should include(error.message)
5050
Show[DecodeError].shows(error) should include(error.message)
5151
Show[ReadError].shows(error) should include(error.message)
5252
}
5353
}
5454

5555
test("Show[ParseError.IOError] should yield a string containing the expected message") {
56-
forAll { error: ParseError.IOError =>
56+
forAll { (error: ParseError.IOError) =>
5757
Show[ParseError.IOError].shows(error) should include(error.message)
5858
Show[ParseError].shows(error) should include(error.message)
5959
Show[ReadError].shows(error) should include(error.message)

0 commit comments

Comments
 (0)