File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
src/test/scala/fpinscalalib Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 77package fpinscalalib
88
99import org .scalacheck .ScalacheckShapeless ._
10+ import org .scalacheck .{Arbitrary , Gen }
1011import org .scalaexercises .Test
1112import org .scalatest .refspec .RefSpec
1213import org .scalatestplus .scalacheck .Checkers
13- import shapeless .HNil
14+ import shapeless ._
1415
1516class GettingStartedWithFPSpec extends RefSpec with Checkers {
16- // def `fibonacci asserts`() =
17- // check(Test.testSuccess(GettingStartedWithFPSection.fibAssert _, 0 :: 1 :: HNil))
17+
18+ def `fibonacci asserts` () = {
19+ implicit val arb = Arbitrary {
20+ for {
21+ res0 <- Gen .choose(2 , 10 )
22+ res1 <- Gen .choose(2 , 10 )
23+ } yield res0 :: res1 :: HNil
24+ }
25+
26+ check(Test .testSuccess(GettingStartedWithFPSection .fibAssert _, 0 :: 1 :: HNil ))
27+ }
1828
1929 def `isSorted asserts` () =
2030 check(
You can’t perform that action at this time.
0 commit comments