Skip to content
Snippets Groups Projects
Commit 262dbf67 authored by Alexander Gehrke's avatar Alexander Gehrke
Browse files

[lec06] Add tests

parent c785a212
No related branches found
No related tags found
No related merge requests found
package typeclasses
import org.scalatest._
import testutil.PendingIfUnimplemented
@SuppressWarnings(Array("org.wartremover.warts.All"))
class FunctorSpec extends FlatSpec with Matchers with AppendedClues with PendingIfUnimplemented {
"The Functor instance for Option" should "be available in implicit scope" in {
"implicitly[Functor[Option]]" should compile
}
}
package typeclasses
import org.scalatest._
import testutil.PendingIfUnimplemented
@SuppressWarnings(Array("org.wartremover.warts.All"))
class ShowSpec extends FlatSpec with Matchers with AppendedClues with PendingIfUnimplemented {
"The Show instance for Person" should "be available in implicit scope" in {
"implicitly[Show[Person]]" should compile
}
it should "display in format\"[firstName] [lastName] is [age] years old\"" in {
// uncomment as soon as you pass the above test
//implicitly[Show[Person]].show(People.odersky) shouldBe "Martin Odersky is 60 years old"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment