Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. ```scala
  2. /**
  3. * {{{
  4. * prop> import org.scalacheck.{Gen, Arbitrary}
  5. * prop> import org.scalacheck.Arbitrary._
  6. * prop> import foo.BarType
  7. * prop> val itemTypeGen = Gen.oneOf(BarType.values)
  8. * prop> implicit val barTypeArbitrary = Arbitrary(barTypeGen)
  9. * prop> (i: Int, t: BarType) => i > 10
  10. * }}}
  11. */
  12. ```
  13.  
  14. ```scala
  15. [error] foo.scala:30: could not find implicit value for parameter
  16. a2: org.scalacheck.Arbitrary[foo.BarType]
  17. [error] check {
  18. [error] ^
  19. ```
  20.  
  21. ----
  22.  
  23. ```scala
  24. /**
  25. * {{{
  26. * prop> import org.scalacheck.{Gen, Arbitrary}
  27. * | import org.scalacheck.Arbitrary._
  28. * | import foo.BarType
  29. * | val itemTypeGen = Gen.oneOf(BarType.values)
  30. * | implicit val barTypeArbitrary = Arbitrary(barTypeGen)
  31. * | (i: Int, t: BarType) => i > 10
  32. * }}}
  33. */
  34. ```
  35.  
  36. ```scala
  37. [info] Run completed in 3 seconds, 561 milliseconds.
  38. [info] Total number of tests run: 0
  39. [info] Suites: completed 1, aborted 0
  40. [info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
  41. [info] No tests were executed.
  42. [info] Passed: Total 0, Failed 0, Errors 0, Passed 0
  43. [success] Total time: 12 s, completed 2014/12/20 0:10:36
  44. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement