Skip to content

Commit

Permalink
Solved problem with test
Browse files Browse the repository at this point in the history
  • Loading branch information
kiroco12 committed Nov 21, 2019
1 parent 1f47d24 commit 59b65f2
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/test/scala/fpinscalalib/GettingStartedWithFPSpec.scala
Expand Up @@ -7,14 +7,24 @@
package fpinscalalib

import org.scalacheck.ScalacheckShapeless._
import org.scalacheck.{Arbitrary, Gen}
import org.scalaexercises.Test
import org.scalatest.refspec.RefSpec
import org.scalatestplus.scalacheck.Checkers
import shapeless.HNil
import shapeless._

class GettingStartedWithFPSpec extends RefSpec with Checkers {
//def `fibonacci asserts`() =
// check(Test.testSuccess(GettingStartedWithFPSection.fibAssert _, 0 :: 1 :: HNil))

def `fibonacci asserts`() = {
implicit val arb = Arbitrary {
for {
res0 <- Gen.choose(2, 10)
res1 <- Gen.choose(2, 10)
} yield res0 :: res1 :: HNil
}

check(Test.testSuccess(GettingStartedWithFPSection.fibAssert _, 0 :: 1 :: HNil))
}

def `isSorted asserts`() =
check(
Expand Down

0 comments on commit 59b65f2

Please sign in to comment.