summaryrefslogblamecommitdiff
path: root/test/files/scalacheck/eqeq.scala
blob: 163f17d94c5456f4793fe14f5282c95e087632ab (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
    }
  }
}