summaryrefslogtreecommitdiff
path: root/test/files/scalacheck/eqeq.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/scalacheck/eqeq.scala')
-rw-r--r--test/files/scalacheck/eqeq.scala17
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
+ }
+ }
+}
+