diff options
author | Martin Odersky <odersky@gmail.com> | 2010-05-10 15:40:08 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-05-10 15:40:08 +0000 |
commit | 0319fec702a7da3538eee9398faea33721df5311 (patch) | |
tree | 4550b8d434dac02b3051b62a34114fbdcaf351a7 /test/files/scalacheck/eqeq.scala | |
parent | f8b4ca8cf0b3957e09a21a1019152ae3d87c8a01 (diff) | |
download | scala-0319fec702a7da3538eee9398faea33721df5311.tar.gz scala-0319fec702a7da3538eee9398faea33721df5311.tar.bz2 scala-0319fec702a7da3538eee9398faea33721df5311.zip |
Disabled scalacheck tests because they interfer...
Disabled scalacheck tests because they interfere with library
refactorings (refactorings break scalacheck).
Diffstat (limited to 'test/files/scalacheck/eqeq.scala')
-rw-r--r-- | test/files/scalacheck/eqeq.scala | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/test/files/scalacheck/eqeq.scala b/test/files/scalacheck/eqeq.scala deleted file mode 100644 index 60fe63c207..0000000000 --- a/test/files/scalacheck/eqeq.scala +++ /dev/null @@ -1,37 +0,0 @@ -import org.scalacheck._ -import Prop._ -import Gen._ - -object Test extends Properties("==") { - def equalObjectsEqualHashcodes(x: Any, y: Any) = (x != y) || (x == y && x.## == y.##) - - // ticket #2087 - property("short/char") = forAll { (x: Short) => { - val ch: Char = x.toChar - (x == ch) == (ch == x) - } - } - - property("symmetry") = forAll { (x: AnyVal, y: AnyVal) => (x == y) == (y == x) } - property("transitivity") = forAll { (x: AnyVal, y: AnyVal, z: AnyVal) => x != y || y != z || x == z } - - property("##") = forAll { - (x: Short) => { - val anyvals = List(x.toByte, x.toChar, x, x.toInt, x.toLong, x.toFloat, x.toDouble, BigInt(x), BigDecimal(x)) - val shortAndLarger = anyvals drop 2 - - val result = ( - ((anyvals, anyvals).zipped forall equalObjectsEqualHashcodes) && - ((shortAndLarger, shortAndLarger).zipped forall (_ == _)) && - ((shortAndLarger, shortAndLarger).zipped forall ((x, y) => (x: Any) == (y: Any))) - ) - result - } - } - property("## 2") = forAll { - (dv: Double) => { - val fv = dv.toFloat - (fv != dv) || (fv.## == dv.##) - } - } -} |