Skip to content

Commit aafecd0

Browse files
authored
Merge pull request #153 from scala-exercises/enrique-2-12-10-update
Updated ScalaTest 3.1.0
2 parents f3b1d3e + 9023eba commit aafecd0

38 files changed

+136
-74
lines changed

build.sbt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ lazy val stdlib = (project in file("."))
1313
%%("shapeless", V.shapeless),
1414
%%("scalatest", V.scalatest),
1515
%%("scalacheck", V.scalacheck),
16-
"com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % V.scalacheckShapeless
16+
"com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % V.scalacheckShapeless,
17+
"org.scalatestplus" %% "scalatestplus-scalacheck" % V.scalatestplusScheck
1718
)
1819
)
1920

project/ProjectPlugin.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ object ProjectPlugin extends AutoPlugin {
1818
lazy val V = new {
1919
val scala212: String = "2.12.10"
2020
val shapeless: String = "2.3.3"
21-
val scalatest: String = "3.0.8"
21+
val scalatest: String = "3.1.0"
22+
val scalatestplusScheck: String = "3.1.0.0-RC2"
2223
val scalacheck: String = "1.14.2"
2324
val scalacheckShapeless: String = "1.2.3"
2425
}

src/main/scala/stdlib/Asserts.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66

77
package stdlib
88

9-
import org.scalatest._
9+
import org.scalatest.flatspec.AnyFlatSpec
10+
import org.scalatest.matchers.should.Matchers
1011

1112
/** @param name asserts
1213
*/
13-
object Asserts extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
14+
object Asserts extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {
1415

1516
/** ScalaTest makes three assertions available by default in any style trait. You can use:
1617
*

src/main/scala/stdlib/ByNameParameter.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66

77
package stdlib
88

9-
import org.scalatest._
9+
import org.scalatest.flatspec.AnyFlatSpec
10+
import org.scalatest.matchers.should.Matchers
1011

1112
/** @param name byname_parameter
1213
*/
13-
object ByNameParameter extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
14+
object ByNameParameter
15+
extends AnyFlatSpec
16+
with Matchers
17+
with org.scalaexercises.definitions.Section {
1418

1519
/** `() => Int` is a Function type that takes a `Unit` type. `Unit` is known as `void` to a Java programmer. The function returns an `Int`. You can place this as a method parameter so that you can you use it as a block, but still it doesn't look quite right:
1620
*/

src/main/scala/stdlib/CaseClasses.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66

77
package stdlib
88

9-
import org.scalatest._
9+
import org.scalatest.flatspec.AnyFlatSpec
10+
import org.scalatest.matchers.should.Matchers
1011

1112
/** @param name case_classes
1213
*/
13-
object CaseClasses extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
14+
object CaseClasses extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {
1415

1516
/** Scala supports the notion of ''case classes''. Case classes are regular classes which export their constructor parameters and which provide a recursive decomposition mechanism via pattern matching.
1617
*

src/main/scala/stdlib/Classes.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66

77
package stdlib
88

9-
import org.scalatest._
9+
import org.scalatest.flatspec.AnyFlatSpec
10+
import org.scalatest.matchers.should.Matchers
1011

1112
/** @param name classes
1213
*/
13-
object Classes extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
14+
object Classes extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {
1415

1516
/** Classes in Scala are static templates that can be instantiated into many objects at runtime.
1617
* Here is a class definition which defines a class Point:

src/main/scala/stdlib/EmptyValues.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66

77
package stdlib
88

9-
import org.scalatest._
9+
import org.scalatest.flatspec.AnyFlatSpec
10+
import org.scalatest.matchers.should.Matchers
1011

1112
/** @param name empty_values
1213
*
1314
*/
14-
object EmptyValues extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
15+
object EmptyValues extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {
1516

1617
/** ==null==
1718
*

src/main/scala/stdlib/Enumerations.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66

77
package stdlib
88

9-
import org.scalatest._
9+
import org.scalatest.flatspec.AnyFlatSpec
10+
import org.scalatest.matchers.should.Matchers
1011

1112
/** @param name enumerations
1213
*
1314
*/
14-
object Enumerations extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
15+
object Enumerations extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {
1516

1617
/** To create an enumeration, create an object that extends the abstract class `Enumeration`, and set a `val` variable to the method `Value`. This is a trick to give values to each `val`.
1718
*

src/main/scala/stdlib/Extractors.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66

77
package stdlib
88

9-
import org.scalatest._
9+
import org.scalatest.flatspec.AnyFlatSpec
10+
import org.scalatest.matchers.should.Matchers
1011

1112
/** @param name extractors
1213
*
1314
*/
14-
object Extractors extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
15+
object Extractors extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {
1516

1617
/** In Scala, patterns can be defined independently of case classes. To this end, a method named `unapply` is defined to yield a so-called extractor.
1718
*

src/main/scala/stdlib/ForExpressions.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66

77
package stdlib
88

9-
import org.scalatest._
9+
import org.scalatest.flatspec.AnyFlatSpec
10+
import org.scalatest.matchers.should.Matchers
1011

1112
/** @param name for_expressions
1213
*
1314
*/
14-
object ForExpressions extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
15+
object ForExpressions
16+
extends AnyFlatSpec
17+
with Matchers
18+
with org.scalaexercises.definitions.Section {
1519

1620
/** `for` expressions can nest, with later generators varying more rapidly than earlier ones:
1721
*/

0 commit comments

Comments
 (0)