Skip to content

Updated ScalaTest 3.1.0 #153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ lazy val stdlib = (project in file("."))
%%("shapeless", V.shapeless),
%%("scalatest", V.scalatest),
%%("scalacheck", V.scalacheck),
"com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % V.scalacheckShapeless
"com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % V.scalacheckShapeless,
"org.scalatestplus" %% "scalatestplus-scalacheck" % V.scalatestplusScheck
)
)

Expand Down
3 changes: 2 additions & 1 deletion project/ProjectPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ object ProjectPlugin extends AutoPlugin {
lazy val V = new {
val scala212: String = "2.12.10"
val shapeless: String = "2.3.3"
val scalatest: String = "3.0.8"
val scalatest: String = "3.1.0"
val scalatestplusScheck: String = "3.1.0.0-RC2"
val scalacheck: String = "1.14.2"
val scalacheckShapeless: String = "1.2.3"
}
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/Asserts.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name asserts
*/
object Asserts extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object Asserts extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** ScalaTest makes three assertions available by default in any style trait. You can use:
*
Expand Down
8 changes: 6 additions & 2 deletions src/main/scala/stdlib/ByNameParameter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name byname_parameter
*/
object ByNameParameter extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object ByNameParameter
extends AnyFlatSpec
with Matchers
with org.scalaexercises.definitions.Section {

/** `() => 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:
*/
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/CaseClasses.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name case_classes
*/
object CaseClasses extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object CaseClasses extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** 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.
*
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/Classes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name classes
*/
object Classes extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object Classes extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** Classes in Scala are static templates that can be instantiated into many objects at runtime.
* Here is a class definition which defines a class Point:
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/EmptyValues.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name empty_values
*
*/
object EmptyValues extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object EmptyValues extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** ==null==
*
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/Enumerations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name enumerations
*
*/
object Enumerations extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object Enumerations extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** 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`.
*
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/Extractors.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name extractors
*
*/
object Extractors extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object Extractors extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** 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.
*
Expand Down
8 changes: 6 additions & 2 deletions src/main/scala/stdlib/ForExpressions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name for_expressions
*
*/
object ForExpressions extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object ForExpressions
extends AnyFlatSpec
with Matchers
with org.scalaexercises.definitions.Section {

/** `for` expressions can nest, with later generators varying more rapidly than earlier ones:
*/
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/Formatting.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name formatting
*
*/
object Formatting extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object Formatting extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** String can be placed in format:
*/
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/HigherOrderFunctions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name higher_order_functions
*
*/
object HigherOrderFunctions
extends FlatSpec
extends AnyFlatSpec
with Matchers
with org.scalaexercises.definitions.Section {

Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/Implicits.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
import scala.language.implicitConversions

/** @param name implicits
*
*/
object Implicits extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object Implicits extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** The actual arguments that are eligible to be passed to an implicit parameter fall into two categories:
*
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/InfixPrefixandPostfixOperators.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
import scala.language.postfixOps

/** @param name infix_prefix_and_postfix_operators
*
*/
object InfixPrefixandPostfixOperators
extends FlatSpec
extends AnyFlatSpec
with Matchers
with org.scalaexercises.definitions.Section {

Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/InfixTypes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name infix_types
*
*/
object InfixTypes extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object InfixTypes extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** An infix type `T1 op T2` consists of an infix operator `op` which gets applied to two
* type operands `T1` and `T2`. The type is equivalent to the type application `op[T1,T2]`.
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/Iterables.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name iterables
*
*/
object Iterables extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object Iterables extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** The next trait from the top in the collections hierarchy is `Iterable`. All methods in this trait are defined in terms of an abstract method, `iterator`, which yields the collection's elements one by one. The `foreach` method from trait `Traversable` is implemented in `Iterable` in terms of `iterator`. Here is the actual implementation:
*
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/Lists.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name lists
*
*/
object Lists extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object Lists extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** Scala Lists are quite similar to arrays, which means all the elements of a list have the same type - but there are two important differences. First, lists are immutable, which means elements of a list cannot be changed by assignment. Second, lists represent a linked list whereas arrays are flat. The type of a list that has elements of type `T` is written as `List[T]`.
*
Expand Down
8 changes: 6 additions & 2 deletions src/main/scala/stdlib/LiteralBooleans.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name literal_booleans
*
*/
object LiteralBooleans extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object LiteralBooleans
extends AnyFlatSpec
with Matchers
with org.scalaexercises.definitions.Section {

/** Boolean literals are either true or false, using the `true` or `false` keyword:
*/
Expand Down
8 changes: 6 additions & 2 deletions src/main/scala/stdlib/LiteralNumbers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name literal_numbers
*
*/
object LiteralNumbers extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object LiteralNumbers
extends AnyFlatSpec
with Matchers
with org.scalaexercises.definitions.Section {

/** Integer literals are 32-bit and can be created from decimals as well as hexadecimals:
*/
Expand Down
8 changes: 6 additions & 2 deletions src/main/scala/stdlib/LiteralStrings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name literal_strings
*
*/
object LiteralStrings extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object LiteralStrings
extends AnyFlatSpec
with Matchers
with org.scalaexercises.definitions.Section {

/** Character literals are quoted with single quotes:
*/
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/Maps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name maps
*
*/
object Maps extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object Maps extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** A `Map` is an `Iterable` consisting of pairs of keys and values (also named mappings or associations). Scala's Predef class offers an implicit conversion that lets you write `key -> value` as an alternate syntax for the pair `(key, value)`. For instance `Map("x" -> 24, "y" -> 25, "z" -> 26)` means exactly the same as `Map(("x", 24), ("y", 25), ("z", 26))`, but reads better.
*
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/NamedandDefaultArguments.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
package stdlib

import NamedandDefaultArgumentsHelper._
import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name named_and_default_arguments
*
*/
object NamedandDefaultArguments
extends FlatSpec
extends AnyFlatSpec
with Matchers
with org.scalaexercises.definitions.Section {

Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/Objects.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

package stdlib

import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name objects
*
*/
object Objects extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object Objects extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** An object is a singleton. One object, that's it. This object is a replacement of static in Java, and is called upon much in the same way:
*/
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/stdlib/Options.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
package stdlib

import OptionsHelper._
import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

/** @param name options
*
*/
object Options extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
object Options extends AnyFlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** If you have worked with Java at all in the past, it is very likely that you have come across a `NullPointerException` at some time (other languages will throw similarly named errors in such a case). Usually this happens because some method returns null when you were not expecting it and thus not dealing with that possibility in your client code. A value of `null` is often abused to represent an absent optional value.
*
Expand Down
Loading