From 335cf100a89affab1ce8111da4de4986077db9cd Mon Sep 17 00:00:00 2001 From: Den Shabalin Date: Fri, 20 Sep 2013 14:17:14 +0200 Subject: harden test case to avoid parsing failure when name is keyword --- test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala') diff --git a/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala b/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala index 153e23d947..ced479aef5 100644 --- a/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala +++ b/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala @@ -39,7 +39,9 @@ trait ClassConstruction { self: QuasiquoteProperties => assertEqAst(q"class Foo extends ..$parents", "class Foo") } - property("splice term name into class") = forAll { (name: TypeName) => + property("splice term name into class") = forAll { (rname: TypeName) => + // add prefix to avoid failure in case rname is keyword + val name = TypeName("prefix$" + rname) eqAst(q"class $name", "class " + name.toString) } -- cgit v1.2.3