diff options
author | Paul Phillips <paulp@improving.org> | 2010-02-24 02:27:03 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-02-24 02:27:03 +0000 |
commit | 415fced48d7ecb097eef257c1a737868acb82575 (patch) | |
tree | 6e709fd01a32098dc1f07bb7dbd6ecf94ae61252 /test/files/scalacheck/eqeq.scala | |
parent | 0284428a9ab8f60f4aea52172412bdfe88735efa (diff) | |
download | scala-415fced48d7ecb097eef257c1a737868acb82575.tar.gz scala-415fced48d7ecb097eef257c1a737868acb82575.tar.bz2 scala-415fced48d7ecb097eef257c1a737868acb82575.zip |
Updated scalacheck jar to current trunk.
not being used. Updated partest with a --scalacheck option. Added
scalacheck tests to the ant build target. Still struggling with
ant/partest/classpaths so it's not on by default yet, but at least
./partest --scalacheck works. We... will... use... scalacheck. And we
will like it! No review.
Diffstat (limited to 'test/files/scalacheck/eqeq.scala')
-rw-r--r-- | test/files/scalacheck/eqeq.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/scalacheck/eqeq.scala b/test/files/scalacheck/eqeq.scala new file mode 100644 index 0000000000..163f17d94c --- /dev/null +++ b/test/files/scalacheck/eqeq.scala @@ -0,0 +1,17 @@ +import org.scalacheck._ +import Prop._ +import Gen._ + +object Test extends Properties("==") { + property("reflexive") = forAll { (x: AnyVal, y: AnyVal) => (x == y) == (y == x) } + // property("hashCode") = forAll { (x + + property("short/char") = forAll { (x: Short) => { + val ch: Char = x.toChar + (x == ch) == (ch == x) || + // that's the whole test once it works, but since it doesn't yet: + x < 0 + } + } +} + |