summaryrefslogtreecommitdiff
path: root/test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2014-02-06 15:59:00 +0100
committerEugene Burmako <xeno.by@gmail.com>2014-02-06 15:59:00 +0100
commitfa02c15d7033714f94cc8510a3a505d60668bf66 (patch)
tree3487352459b6631660d19a8fb311ca496d048cfb /test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala
parent0c16bb0af13c1b30224dcb9de0b88354663d834b (diff)
parentffc3203c3688b6fc5f47f4043bf3a0090de9d985 (diff)
downloadscala-fa02c15d7033714f94cc8510a3a505d60668bf66.tar.gz
scala-fa02c15d7033714f94cc8510a3a505d60668bf66.tar.bz2
scala-fa02c15d7033714f94cc8510a3a505d60668bf66.zip
Merge pull request #3458 from densh/si/8173
SI-8173 add support for patterns like init :+ last to quasiquotes
Diffstat (limited to 'test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala')
-rw-r--r--test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala22
1 files changed, 16 insertions, 6 deletions
diff --git a/test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala b/test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala
index 209fe9bbeb..88e00c734b 100644
--- a/test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala
+++ b/test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala
@@ -125,18 +125,28 @@ trait ModsDeconstruction { self: QuasiquoteProperties =>
}
property("@..$annots def foo") = test {
- val a = annot("a")
- val b = annot("b")
+ val a = q"new a"
+ val b = q"new b"
val q"@..$annots def foo" = q"@$a @$b def foo"
annots ≈ List(a, b)
}
property("@$annot @..$annots def foo") = test {
- val a = annot("a")
- val b = annot("b")
- val c = annot("c")
+ val a = q"new a"
+ val b = q"new b"
+ val c = q"new c"
val q"@$first @..$rest def foo" = q"@$a @$b @$c def foo"
- first ≈ a && rest ≈ List(b, c)
+ assert(first ≈ a)
+ assert(rest ≈ List(b, c))
+ }
+
+ property("@..$anots @$annot def foo") = test {
+ val a = q"new a"
+ val b = q"new b"
+ val c = q"new c"
+ val q"@..$init @$last def foo" = q"@$a @$b @$c def foo"
+ assert(init ≈ List(a, b))
+ assert(last ≈ c)
}
}