summaryrefslogtreecommitdiff
path: root/test/disabled
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-10-21 22:59:31 +0000
committerPaul Phillips <paulp@improving.org>2011-10-21 22:59:31 +0000
commit0172051d24698dc91210bfcdeec53638ed222b07 (patch)
treeb69c21a470889a772db4ece5958951fdf9299c5e /test/disabled
parentad3dada12c9f4d23e58de19022b527e872db4308 (diff)
downloadscala-0172051d24698dc91210bfcdeec53638ed222b07.tar.gz
scala-0172051d24698dc91210bfcdeec53638ed222b07.tar.bz2
scala-0172051d24698dc91210bfcdeec53638ed222b07.zip
Disabled failing "code" test.
This has been failing the Xcheckinit build for weeks and is now failing the regular build too. I'm checking in some hairy stuff and I'd like to make a good impression on it. Review by odersky.
Diffstat (limited to 'test/disabled')
-rw-r--r--test/disabled/run/code.check18
-rw-r--r--test/disabled/run/code.scala52
2 files changed, 70 insertions, 0 deletions
diff --git a/test/disabled/run/code.check b/test/disabled/run/code.check
new file mode 100644
index 0000000000..23263600ea
--- /dev/null
+++ b/test/disabled/run/code.check
@@ -0,0 +1,18 @@
+testing: ((x: Int) => x.$plus(ys.length))
+result = ((x: Int) => x.+{(x: <?>)Int}(ys.length{Int}){Int}){Int => Int}
+testing: (() => {
+ val e: Element = new Element("someName");
+ e
+})
+result = (() => {
+ val e: Element = new Element{Element}{(name: <?>)Element}("someName"{String("someName")}){Element};
+ e{Element}
+}{Element}){() => Element}
+testing: (() => truc.elem = 6)
+result = (() => truc.elem{Int} = 6{Int(6)}{Unit}){() => Unit}
+testing: (() => truc.elem = truc.elem.$plus(6))
+result = (() => truc.elem{Int} = truc.elem.+{(x: <?>)Int}(6{Int(6)}){Int}{Unit}){() => Unit}
+testing: (() => new baz.BazElement("someName"))
+result = (() => new baz.BazElement{baz.BazElement}{(name: <?>)baz.BazElement}("someName"{String("someName")}){baz.BazElement}){() => baz.BazElement}
+testing: ((x: Int) => x.$plus(ys.length))
+result = ((x: Int) => x.+{(x: <?>)Int}(ys.length{Int}){Int}){Int => Int}
diff --git a/test/disabled/run/code.scala b/test/disabled/run/code.scala
new file mode 100644
index 0000000000..8881c2eda8
--- /dev/null
+++ b/test/disabled/run/code.scala
@@ -0,0 +1,52 @@
+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()
+ new baz.A(args)
+
+ def show() {
+ def foo[T](ys: List[T]) = {
+ val fun: reflect.Code[Int => Int] = x => x + ys.length
+ CodeTest(fun, args)
+ }
+ foo(List(1, 2, 3))
+ }
+
+ show()
+}
+
+package baz {
+
+ case class BazElement(name: String) { }
+
+ class A(args: Array[String]) {
+ CodeTest(() => new baz.BazElement("someName"), args)
+ }
+
+}
+
+
+