Advertisement
eallik

Untitled

Sep 11th, 2014
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.51 KB | None | 0 0
  1. object Foo extends Properties("Foo") {
  2.   import Gen._
  3.  
  4.   property("bar") =
  5.     forAll(listOfN(4, choose(0, 255))) { n =>
  6.       println(n)
  7.       false
  8.     }
  9. }
  10.  
  11. // --- OUTPUT ---
  12. // List(19, 152, 240, 72)
  13. // List(19, 152)
  14. // List(19)
  15. // List()
  16. // [info] ! Foo.bar: Exception raised on property evaluation.
  17. // [info] > ARG_0: List()
  18. // [info] > ARG_0_ORIGINAL: List("19", "152", "240", "72")
  19. // [info] > Exception: scala.MatchError: List() (of class scala.collection.immutable.Nil$)
  20. // [info] ScalaTest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement