From e4879d785db81bb4e954d3d3d4b99243b9fb548c Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 27 Sep 2011 10:18:29 +0000 Subject: Added new test file for reification/relfection,... Added new test file for reification/relfection, which does not work yet under partest, but works when run individually. --- test/disabled/run/code.scala | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 test/disabled/run/code.scala (limited to 'test') diff --git a/test/disabled/run/code.scala b/test/disabled/run/code.scala new file mode 100644 index 0000000000..7074943206 --- /dev/null +++ b/test/disabled/run/code.scala @@ -0,0 +1,33 @@ +import scala.tools.partest.utils.CodeTest + +case class Element(name: String) + +object Test extends App { + case class InnerElement(name: String) + def foo[T](ys: List[T]) = { + val fun: reflect.Code[Int => Int] = x => x + ys.length + fun + } + CodeTest(foo(List(2)), args) + CodeTest({() => val e = Element("someName"); e}, args) +// CodeTest({() => val e = InnerElement("someName"); e}, args) // (does not work yet) + def titi() = { + var truc = 0 + CodeTest(() => { + truc = 6 + }, args) + } + def tata(): Unit = { + var truc = 0 + CodeTest(() => { + truc = truc + 6 + }, args) + } + titi() + tata() +} + + + + + -- cgit v1.2.3