From e8a121e9e1ade3f283f42fceb3c18f30a8468f57 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 5 Apr 2010 06:24:22 +0000 Subject: If I work on this patch any longer without chec... If I work on this patch any longer without checking in I will go stark raving mad. It is broken up into a couple pieces. This one is the changes to test/. It includes fixing a bunch of tests, removing deprecated constructs, moving jars used by tests to the most specific plausible location rather than having all jars on the classpath of all tests, and some filesystem layout change (continuations get their whole own srcpath.) This would be the world's most tedious review, so let's say no review. [Note: after this commit, I doubt things will build very smoothly until the rest of the partest changes follow. Which should only be seconds, but just in case.] --- test/files/continuations-neg/function0.check | 6 ----- test/files/continuations-neg/function0.scala | 16 -------------- test/files/continuations-neg/function2.check | 6 ----- test/files/continuations-neg/function2.scala | 16 -------------- test/files/continuations-neg/function3.check | 6 ----- test/files/continuations-neg/function3.scala | 15 ------------- test/files/continuations-neg/infer0.check | 4 ---- test/files/continuations-neg/infer0.scala | 14 ------------ test/files/continuations-neg/infer2.check | 4 ---- test/files/continuations-neg/infer2.scala | 19 ---------------- test/files/continuations-neg/lazy.check | 6 ----- test/files/continuations-neg/lazy.scala | 16 -------------- test/files/continuations-neg/t1929.check | 6 ----- test/files/continuations-neg/t1929.scala | 17 -------------- test/files/continuations-neg/t2285.check | 6 ----- test/files/continuations-neg/t2285.scala | 11 ---------- test/files/continuations-neg/t2949.check | 6 ----- test/files/continuations-neg/t2949.scala | 15 ------------- test/files/continuations-neg/trycatch2.check | 7 ------ test/files/continuations-neg/trycatch2.scala | 33 ---------------------------- 20 files changed, 229 deletions(-) delete mode 100644 test/files/continuations-neg/function0.check delete mode 100644 test/files/continuations-neg/function0.scala delete mode 100644 test/files/continuations-neg/function2.check delete mode 100644 test/files/continuations-neg/function2.scala delete mode 100644 test/files/continuations-neg/function3.check delete mode 100644 test/files/continuations-neg/function3.scala delete mode 100644 test/files/continuations-neg/infer0.check delete mode 100644 test/files/continuations-neg/infer0.scala delete mode 100644 test/files/continuations-neg/infer2.check delete mode 100644 test/files/continuations-neg/infer2.scala delete mode 100644 test/files/continuations-neg/lazy.check delete mode 100644 test/files/continuations-neg/lazy.scala delete mode 100644 test/files/continuations-neg/t1929.check delete mode 100644 test/files/continuations-neg/t1929.scala delete mode 100644 test/files/continuations-neg/t2285.check delete mode 100644 test/files/continuations-neg/t2285.scala delete mode 100644 test/files/continuations-neg/t2949.check delete mode 100644 test/files/continuations-neg/t2949.scala delete mode 100644 test/files/continuations-neg/trycatch2.check delete mode 100644 test/files/continuations-neg/trycatch2.scala (limited to 'test/files/continuations-neg') diff --git a/test/files/continuations-neg/function0.check b/test/files/continuations-neg/function0.check deleted file mode 100644 index 0a66763a0f..0000000000 --- a/test/files/continuations-neg/function0.check +++ /dev/null @@ -1,6 +0,0 @@ -function0.scala:11: error: type mismatch; - found : () => Int @scala.util.continuations.cpsParam[Int,Int] - required: () => Int - val g: () => Int = f - ^ -one error found diff --git a/test/files/continuations-neg/function0.scala b/test/files/continuations-neg/function0.scala deleted file mode 100644 index 4112ee3835..0000000000 --- a/test/files/continuations-neg/function0.scala +++ /dev/null @@ -1,16 +0,0 @@ -// $Id$ - -import scala.util.continuations._ - - -object Test { - - def main(args: Array[String]): Any = { - - val f = () => shift { k: (Int=>Int) => k(7) } - val g: () => Int = f - - println(reset(g())) - } - -} \ No newline at end of file diff --git a/test/files/continuations-neg/function2.check b/test/files/continuations-neg/function2.check deleted file mode 100644 index 4833057652..0000000000 --- a/test/files/continuations-neg/function2.check +++ /dev/null @@ -1,6 +0,0 @@ -function2.scala:11: error: type mismatch; - found : () => Int - required: () => Int @util.continuations.package.cps[Int] - val g: () => Int @cps[Int] = f - ^ -one error found diff --git a/test/files/continuations-neg/function2.scala b/test/files/continuations-neg/function2.scala deleted file mode 100644 index ae0fda509d..0000000000 --- a/test/files/continuations-neg/function2.scala +++ /dev/null @@ -1,16 +0,0 @@ -// $Id$ - -import scala.util.continuations._ - - -object Test { - - def main(args: Array[String]): Any = { - - val f = () => 7 - val g: () => Int @cps[Int] = f - - println(reset(g())) - } - -} \ No newline at end of file diff --git a/test/files/continuations-neg/function3.check b/test/files/continuations-neg/function3.check deleted file mode 100644 index 4705ad9ed9..0000000000 --- a/test/files/continuations-neg/function3.check +++ /dev/null @@ -1,6 +0,0 @@ -function3.scala:10: error: type mismatch; - found : Int @scala.util.continuations.cpsParam[Int,Int] - required: Int - val g: () => Int = () => shift { k: (Int=>Int) => k(7) } - ^ -one error found diff --git a/test/files/continuations-neg/function3.scala b/test/files/continuations-neg/function3.scala deleted file mode 100644 index 0c3f1667e5..0000000000 --- a/test/files/continuations-neg/function3.scala +++ /dev/null @@ -1,15 +0,0 @@ -// $Id$ - -import scala.util.continuations._ - - -object Test { - - def main(args: Array[String]): Any = { - - val g: () => Int = () => shift { k: (Int=>Int) => k(7) } - - println(reset(g())) - } - -} \ No newline at end of file diff --git a/test/files/continuations-neg/infer0.check b/test/files/continuations-neg/infer0.check deleted file mode 100644 index 1dd072ef09..0000000000 --- a/test/files/continuations-neg/infer0.check +++ /dev/null @@ -1,4 +0,0 @@ -infer0.scala:11: error: cannot cps-transform expression 8: type arguments [Int(8),String,Int] do not conform to method shiftUnit's type parameter bounds [A,B,C >: B] - test(8) - ^ -one error found diff --git a/test/files/continuations-neg/infer0.scala b/test/files/continuations-neg/infer0.scala deleted file mode 100644 index 894d5228b1..0000000000 --- a/test/files/continuations-neg/infer0.scala +++ /dev/null @@ -1,14 +0,0 @@ -// $Id$ - -import scala.util.continuations._ - - -object Test { - - def test(x: => Int @cpsParam[String,Int]) = 7 - - def main(args: Array[String]): Any = { - test(8) - } - -} \ No newline at end of file diff --git a/test/files/continuations-neg/infer2.check b/test/files/continuations-neg/infer2.check deleted file mode 100644 index 59eb670bc3..0000000000 --- a/test/files/continuations-neg/infer2.check +++ /dev/null @@ -1,4 +0,0 @@ -infer2.scala:14: error: illegal answer type modification: scala.util.continuations.cpsParam[String,Int] andThen scala.util.continuations.cpsParam[String,Int] - test { sym(); sym() } - ^ -one error found diff --git a/test/files/continuations-neg/infer2.scala b/test/files/continuations-neg/infer2.scala deleted file mode 100644 index a890ac1fc4..0000000000 --- a/test/files/continuations-neg/infer2.scala +++ /dev/null @@ -1,19 +0,0 @@ -// $Id$ - -import scala.util.continuations._ - - -object Test { - - def test(x: => Int @cpsParam[String,Int]) = 7 - - def sym() = shift { k: (Int => String) => 9 } - - - def main(args: Array[String]): Any = { - test { sym(); sym() } - } - -} - - diff --git a/test/files/continuations-neg/lazy.check b/test/files/continuations-neg/lazy.check deleted file mode 100644 index bfa44c59a4..0000000000 --- a/test/files/continuations-neg/lazy.check +++ /dev/null @@ -1,6 +0,0 @@ -lazy.scala:5: error: type mismatch; - found : Unit @scala.util.continuations.cpsParam[Unit,Unit] - required: Unit - def foo = { - ^ -one error found diff --git a/test/files/continuations-neg/lazy.scala b/test/files/continuations-neg/lazy.scala deleted file mode 100644 index dffc57ffa0..0000000000 --- a/test/files/continuations-neg/lazy.scala +++ /dev/null @@ -1,16 +0,0 @@ -import scala.util.continuations._ - -object Test { - - def foo = { - lazy val x = shift((k:Unit=>Unit)=>k()) - println(x) - } - - def main(args: Array[String]) { - reset { - foo - } - } - -} \ No newline at end of file diff --git a/test/files/continuations-neg/t1929.check b/test/files/continuations-neg/t1929.check deleted file mode 100644 index f42c3a1e15..0000000000 --- a/test/files/continuations-neg/t1929.check +++ /dev/null @@ -1,6 +0,0 @@ -t1929.scala:8: error: type mismatch; - found : Int @scala.util.continuations.cpsParam[String,java.lang.String] @scala.util.continuations.cpsSynth - required: Int @scala.util.continuations.cpsParam[Int,java.lang.String] - reset { - ^ -one error found diff --git a/test/files/continuations-neg/t1929.scala b/test/files/continuations-neg/t1929.scala deleted file mode 100644 index 02eda9170d..0000000000 --- a/test/files/continuations-neg/t1929.scala +++ /dev/null @@ -1,17 +0,0 @@ -// $Id$ - -import scala.util.continuations._ - - -object Test { - def main(args : Array[String]) { - reset { - println("up") - val x = shift((k:Int=>String) => k(8) + k(2)) - println("down " + x) - val y = shift((k:Int=>String) => k(3)) - println("down2 " + y) - y + x - } - } -} \ No newline at end of file diff --git a/test/files/continuations-neg/t2285.check b/test/files/continuations-neg/t2285.check deleted file mode 100644 index d5dff6a4f2..0000000000 --- a/test/files/continuations-neg/t2285.check +++ /dev/null @@ -1,6 +0,0 @@ -t2285.scala:9: error: type mismatch; - found : Int @scala.util.continuations.cpsParam[String,String] @scala.util.continuations.cpsSynth - required: Int @scala.util.continuations.cpsParam[Int,String] - def foo() = reset { bar(); 7 } - ^ -one error found diff --git a/test/files/continuations-neg/t2285.scala b/test/files/continuations-neg/t2285.scala deleted file mode 100644 index f3c7f4c89c..0000000000 --- a/test/files/continuations-neg/t2285.scala +++ /dev/null @@ -1,11 +0,0 @@ -// $Id$ - -import scala.util.continuations._ - -object Test { - - def bar() = shift { k: (String => String) => k("1") } - - def foo() = reset { bar(); 7 } - -} diff --git a/test/files/continuations-neg/t2949.check b/test/files/continuations-neg/t2949.check deleted file mode 100644 index dd9768807c..0000000000 --- a/test/files/continuations-neg/t2949.check +++ /dev/null @@ -1,6 +0,0 @@ -t2949.scala:13: error: type mismatch; - found : Int - required: ? @scala.util.continuations.cpsParam[List[?],Any] - x * y - ^ -one error found diff --git a/test/files/continuations-neg/t2949.scala b/test/files/continuations-neg/t2949.scala deleted file mode 100644 index ce27c7c0e8..0000000000 --- a/test/files/continuations-neg/t2949.scala +++ /dev/null @@ -1,15 +0,0 @@ -// $Id$ - -import scala.util.continuations._ - -object Test { - - def reflect[A,B](xs : List[A]) = shift{ xs.flatMap[B, List[B]] } - def reify[A, B](x : A @cpsParam[List[A], B]) = reset{ List(x) } - - def main(args: Array[String]): Unit = println(reify { - val x = reflect[Int, Int](List(1,2,3)) - val y = reflect[Int, Int](List(2,4,8)) - x * y - }) -} diff --git a/test/files/continuations-neg/trycatch2.check b/test/files/continuations-neg/trycatch2.check deleted file mode 100644 index 5ff2838bad..0000000000 --- a/test/files/continuations-neg/trycatch2.check +++ /dev/null @@ -1,7 +0,0 @@ -trycatch2.scala:11: error: only simple cps types allowed in try/catch blocks (found: Int @scala.util.continuations.cpsParam[String,Int]) - def foo1 = try { - ^ -trycatch2.scala:19: error: only simple cps types allowed in try/catch blocks (found: Int @scala.util.continuations.cpsParam[String,Int]) - def foo2 = try { - ^ -two errors found diff --git a/test/files/continuations-neg/trycatch2.scala b/test/files/continuations-neg/trycatch2.scala deleted file mode 100644 index 761cee52ac..0000000000 --- a/test/files/continuations-neg/trycatch2.scala +++ /dev/null @@ -1,33 +0,0 @@ -// $Id$ - -import scala.util.continuations._ - -object Test { - - def fatal[T]: T = throw new Exception - def cpsIntStringInt = shift { k:(Int=>String) => k(3); 7 } - def cpsIntIntString = shift { k:(Int=>Int) => k(3); "7" } - - def foo1 = try { - fatal[Int] - cpsIntStringInt - } catch { - case ex => - cpsIntStringInt - } - - def foo2 = try { - fatal[Int] - cpsIntStringInt - } catch { - case ex => - cpsIntStringInt - } - - - def main(args: Array[String]): Unit = { - println(reset { foo1; "3" }) - println(reset { foo2; "3" }) - } - -} \ No newline at end of file -- cgit v1.2.3