summaryrefslogtreecommitdiff
path: root/test/files/scalacheck/quasiquotes/TermConstructionProps.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/scalacheck/quasiquotes/TermConstructionProps.scala')
-rw-r--r--test/files/scalacheck/quasiquotes/TermConstructionProps.scala10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/files/scalacheck/quasiquotes/TermConstructionProps.scala b/test/files/scalacheck/quasiquotes/TermConstructionProps.scala
index 753ad1aa59..9284903623 100644
--- a/test/files/scalacheck/quasiquotes/TermConstructionProps.scala
+++ b/test/files/scalacheck/quasiquotes/TermConstructionProps.scala
@@ -7,7 +7,6 @@ import scala.reflect.runtime.universe._
import Flag._
object TermConstructionProps extends QuasiquoteProperties("term construction") {
-
property("splice single tree return tree itself") = forAll { (t: Tree) =>
q"$t" ≈ t
}
@@ -191,4 +190,13 @@ object TermConstructionProps extends QuasiquoteProperties("term construction") {
val assignx = q"x = 1"
assertEqAst(q"f($assignx)", "f(x = 1)")
}
+
+ property("fresh names are regenerated at each evaluation") = test {
+ def plusOne = q"{ _ + 1 }"
+ assert(!(plusOne ≈ plusOne))
+ def whileTrue = q"while(true) false"
+ assert(!(whileTrue ≈ whileTrue))
+ def withEvidence = q"def foo[T: X]"
+ assert(!(withEvidence ≈ withEvidence))
+ }
}