diff options
Diffstat (limited to 'tests/pending')
-rw-r--r-- | tests/pending/run/NestedClasses.check | 9 | ||||
-rw-r--r-- | tests/pending/run/NestedClasses.scala | 97 | ||||
-rw-r--r-- | tests/pending/run/array-addition.check | 4 | ||||
-rw-r--r-- | tests/pending/run/array-addition.scala | 11 | ||||
-rw-r--r-- | tests/pending/run/collections.check | 42 | ||||
-rw-r--r-- | tests/pending/run/collections.scala | 119 | ||||
-rw-r--r-- | tests/pending/run/constructors.check | 5 | ||||
-rw-r--r-- | tests/pending/run/constructors.scala | 27 | ||||
-rw-r--r-- | tests/pending/run/shortClass.check | 10 | ||||
-rw-r--r-- | tests/pending/run/shortClass.scala | 24 | ||||
-rw-r--r-- | tests/pending/run/t5610a.check | 1 | ||||
-rw-r--r-- | tests/pending/run/t5610a.scala | 19 | ||||
-rw-r--r-- | tests/pending/run/t8611b.flags | 1 | ||||
-rw-r--r-- | tests/pending/run/t8611b.scala | 54 |
14 files changed, 0 insertions, 423 deletions
diff --git a/tests/pending/run/NestedClasses.check b/tests/pending/run/NestedClasses.check deleted file mode 100644 index a7ebc386e..000000000 --- a/tests/pending/run/NestedClasses.check +++ /dev/null @@ -1,9 +0,0 @@ -e.e1 = 119 -cc.m = 3 -cc.am = 1 -cc.bm = 2 -aaa.f = 111 -bbb1.f = 42 -bbb2.f = 24 -bbb3.f = 24 -bbb4.f = 24 diff --git a/tests/pending/run/NestedClasses.scala b/tests/pending/run/NestedClasses.scala deleted file mode 100644 index 6db713e08..000000000 --- a/tests/pending/run/NestedClasses.scala +++ /dev/null @@ -1,97 +0,0 @@ -//############################################################################ -// Test nested classes -//############################################################################ - -// The following set of classes tests nasty references to "outer" -// values. - -class A(pa : Int) { - def a1 = pa; - class B(pb : Int) { - def b1 = pa+pb+a1; - class C(pc : Int) extends A(b1) { - def c1 = pc+pb+pa - } - val c1 = new C(13) - } -} - -trait M { - def m1 = 1 -} - -class A1(x : Int) extends A(x) with M { - class D extends B(14) { - val c2 = new C(15); - class E extends C(16) { - def e1 = c1+b1+a1+m1; - def e2 = new D(); - } - } -} - -// The following set of classes test qualified "this" and "super" -// references. - -class AA { - def m = 1; - class BB { - def m = 2; - class CC { - def m = 3; - def am = AA.this.m; - def bm = BB.this.m; - } - } -} - -class AAA { - def f = 42; -} - -class BBB extends AAA { - override def f = 24; -} - -class AAA1 extends AAA { - override def f = 111; - class BBB1 extends BBB { - override def f = AAA1.super.f; - } - class BBB2 extends BBB { - override def f = BBB2.super.f; - } - class BBB3 extends BBB { - override def f = super.f; - } - class BBB4 extends BBB { } -} - -object Test { - def main(args: Array[String]): Unit = { - val a = new A1(12); - val d = new a.D; - val e = new d.E; - Console.println("e.e1 = " + e.e1); - - val aa = new AA; - val bb = new aa.BB; - val cc = new bb.CC; - Console.println("cc.m = " + cc.m); - Console.println("cc.am = " + cc.am); - Console.println("cc.bm = " + cc.bm); - - val aaa = new AAA1; - val bbb1 = new aaa.BBB1; - val bbb2 = new aaa.BBB2; - val bbb3 = new aaa.BBB3; - val bbb4 = new aaa.BBB4; - Console.println("aaa.f = " + aaa.f); - Console.println("bbb1.f = " + bbb1.f); - Console.println("bbb2.f = " + bbb2.f); - Console.println("bbb3.f = " + bbb3.f); - Console.println("bbb4.f = " + bbb4.f); - } -} - -//############################################################################ diff --git a/tests/pending/run/array-addition.check b/tests/pending/run/array-addition.check deleted file mode 100644 index 7bfbd9c71..000000000 --- a/tests/pending/run/array-addition.check +++ /dev/null @@ -1,4 +0,0 @@ -Array(1, 2, 3, 4) -Array(1, 2, 3, 4) -Array(1) -Array(1) diff --git a/tests/pending/run/array-addition.scala b/tests/pending/run/array-addition.scala deleted file mode 100644 index 8def48e85..000000000 --- a/tests/pending/run/array-addition.scala +++ /dev/null @@ -1,11 +0,0 @@ -object Test { - def prettyPrintArray(x: Array[_]) = println("Array(" + x.mkString(", ") + ")") - - def main(args: Array[String]): Unit = { - prettyPrintArray(Array(1,2,3) :+ 4) - prettyPrintArray(1 +: Array(2,3,4)) - prettyPrintArray(Array() :+ 1) - prettyPrintArray(1 +: Array()) - } -} - diff --git a/tests/pending/run/collections.check b/tests/pending/run/collections.check deleted file mode 100644 index c24150b24..000000000 --- a/tests/pending/run/collections.check +++ /dev/null @@ -1,42 +0,0 @@ -***** mutable.HashSet: -test1: 14005 -test2: 25005003, iters = 5000 -test3: 25005003 -***** mutable.LinkedHashSet: -test1: 14005 -test2: 25005003, iters = 5000 -test3: 25005003 -***** immutable.Set: -test1: 14005 -test2: 25005003, iters = 5000 -test3: 25005003 -***** immutable.ListSet: -test1: 14005 -test2: 25005003, iters = 5000 -test3: 25005003 -***** immutable.TreeSet: -test1: 14005 -test2: 25005003, iters = 5000 -test3: 25005003 -***** mutable.HashMap: -test1: 14005 -test2: 25005003, iters = 5000 -test3: 25005003 -***** mutable.LinkedHashMap: -test1: 14005 -test2: 25005003, iters = 5000 -test3: 25005003 -***** immutable.Map: -test1: 14005 -test2: 25005003, iters = 5000 -test3: 25005003 -test4: 25005003 -***** immutable.TreeMap: -test1: 14005 -test2: 25005003, iters = 5000 -test3: 25005003 -test4: 25005003 -***** immutable.ListMap: -test1: 14005 -test2: 9007003, iters = 3000 -test3: 9007003 diff --git a/tests/pending/run/collections.scala b/tests/pending/run/collections.scala deleted file mode 100644 index acc2d93ff..000000000 --- a/tests/pending/run/collections.scala +++ /dev/null @@ -1,119 +0,0 @@ -import scala.collection._ -import scala.compat.Platform.currentTime -import scala.language.postfixOps - -object Test extends dotty.runtime.LegacyApp { - - val printTime = false - - def sum[A](xs: Iterable[Int]) = (0 /: xs)((x, y) => x + y) - - def time(op: => Unit): Unit = { - val start = currentTime - op - if (printTime) println(" time = "+(currentTime - start)+"ms") - } - - def test(msg: String, s0: collection.immutable.Set[Int], iters: Int) = { - println("***** "+msg+":") - var s = s0 - s = s + 2 - s = s + (3, 4000, 10000) - println("test1: "+sum(s)) - time { - s = s ++ (List.range(0, iters) map (2*)) - println("test2: "+sum(s)+", iters = "+iters) - } - time { - var x = 0 - for (i <- 0 to 10000) - if (s contains i) x += i - println("test3: "+x) - } - } - - def test(msg: String, s0: collection.mutable.Set[Int], iters: Int) = { - println("***** "+msg+":") - var s = s0 - s = s + 2 - s = s + (3, 4000, 10000) - println("test1: "+sum(s)) - time { - s = s ++ (List.range(0, iters) map (2*)) - println("test2: "+sum(s)+", iters = "+iters) - } - time { - var x = 0 - for (i <- 0 to 10000) - if (s contains i) x += i - println("test3: "+x) - } - } - - def test(msg: String, s0: collection.immutable.Map[Int, Int], iters: Int) = { - println("***** "+msg+":") - var s = s0 - s = s + (2 -> 2) - s = s + (3 -> 3, 4000 -> 4000, 10000 -> 10000) - println("test1: "+sum(s map (_._2))) - time { - s = s ++ (List.range(0, iters) map (x => x * 2 -> x * 2)) - println("test2: "+sum(s map (_._2))+", iters = "+iters) - } - time { - var x = 0 - for (i <- 0 to 10000) - s get i match { - case Some(i) => x += i - case None => - } - println("test3: "+x) - } - if (iters == 5000) { - time { - var s1 = s - var x = 0 - for (i <- 0 to 10000) { - s get i match { - case Some(i) => x += i - case None => - } - s1 = s1 + ((i + 10000) -> i) - } - println("test4: "+x) - } - } - } - - def test(msg: String, s0: collection.mutable.Map[Int, Int], iters: Int) = { - println("***** "+msg+":") - var s = s0 - s = s + (2 -> 2) - s = s + (3 -> 3, 4000 -> 4000, 10000 -> 10000) - println("test1: "+sum(s map (_._2))) - time { - s = s ++ (List.range(0, iters) map (x => x * 2 -> x * 2)) - println("test2: "+sum(s map (_._2))+", iters = "+iters) - } - time { - var x = 0 - for (i <- 0 to 10000) - s get i match { - case Some(i) => x += i - case None => - } - println("test3: "+x) - } - } - - test("mutable.HashSet", new mutable.HashSet[Int], 5000) - test("mutable.LinkedHashSet", new mutable.LinkedHashSet[Int], 5000) - test("immutable.Set", immutable.Set[Int](), 5000) - test("immutable.ListSet", new immutable.ListSet[Int], 5000) - test("immutable.TreeSet", new immutable.TreeSet[Int], 5000) - test("mutable.HashMap", new mutable.HashMap[Int, Int], 5000) - test("mutable.LinkedHashMap", new mutable.LinkedHashMap[Int, Int], 5000) - test("immutable.Map", immutable.Map[Int, Int](), 5000) - test("immutable.TreeMap", new immutable.TreeMap[Int, Int], 5000) - test("immutable.ListMap", new immutable.ListMap[Int, Int], 3000) -} diff --git a/tests/pending/run/constructors.check b/tests/pending/run/constructors.check deleted file mode 100644 index 0743b7e29..000000000 --- a/tests/pending/run/constructors.check +++ /dev/null @@ -1,5 +0,0 @@ -x=1 y=2 -x=3 y=3 -x=1 y=1 -x=1 y=2 a=1 b=2 c=a -x=3 y=3 a=3 b=3 c=b diff --git a/tests/pending/run/constructors.scala b/tests/pending/run/constructors.scala deleted file mode 100644 index 90926431f..000000000 --- a/tests/pending/run/constructors.scala +++ /dev/null @@ -1,27 +0,0 @@ -// Test constructors, including multiple ones. - -class A(x: Int, y: Int) { - def this(x: Int) = this(x, x); - def this() = this(1); - override def toString() = "x=" + x + " y=" + y; - class B(a: Int, b: Int, c: String) { - def this(str: String) = this(x, y, str); - override def toString() = - "x=" + x + " y=" + y + " a=" + a + " b=" + b + " c=" + c; - } -} - -object Test { - def main(args: Array[String]): Unit = { - val a1 = new A(1,2); - val a2 = new A(3); - val a3 = new A(); - val b1 = new a1.B(1,2,"a"); - val b2 = new a2.B("b"); - Console.println(a1); - Console.println(a2); - Console.println(a3); - Console.println(b1); - Console.println(b2); - } -} diff --git a/tests/pending/run/shortClass.check b/tests/pending/run/shortClass.check deleted file mode 100644 index fbdb725cc..000000000 --- a/tests/pending/run/shortClass.check +++ /dev/null @@ -1,10 +0,0 @@ -bippity.bop.Foo -bippity.bop.Foo$Bar -bippity.bop.Foo$Bar$ -Test$$anon$1 -Test$$anon$2 -Foo -Bar -Bar$ -Foo with DingDongBippy -Bar with DingDongBippy diff --git a/tests/pending/run/shortClass.scala b/tests/pending/run/shortClass.scala deleted file mode 100644 index b7bb01689..000000000 --- a/tests/pending/run/shortClass.scala +++ /dev/null @@ -1,24 +0,0 @@ -import scala.reflect.internal.util._ - -package bippity { - trait DingDongBippy - - package bop { - class Foo { - class Bar - object Bar - } - } -} - -object Test { - import bippity._ - import bop._ - - def main(args: Array[String]): Unit = { - val f = new Foo - val instances = List(f, new f.Bar, f.Bar, new Foo with DingDongBippy, new f.Bar with DingDongBippy) - instances map (_.getClass.getName) foreach println - instances map shortClassOfInstance foreach println - } -} diff --git a/tests/pending/run/t5610a.check b/tests/pending/run/t5610a.check deleted file mode 100644 index 2aa46b3b9..000000000 --- a/tests/pending/run/t5610a.check +++ /dev/null @@ -1 +0,0 @@ -Stroke a kitten diff --git a/tests/pending/run/t5610a.scala b/tests/pending/run/t5610a.scala deleted file mode 100644 index 3787c0984..000000000 --- a/tests/pending/run/t5610a.scala +++ /dev/null @@ -1,19 +0,0 @@ -object Test extends dotty.runtime.LegacyApp { - class Result(_str: => String) { - lazy val str = _str - } - - def foo(str: => String)(i: Int) = new Result(str) - - def bar(f: Int => Result) = f(42) - - var test: String = null - val result = bar(foo(test)) - test = "bar" - - if (result.str == null) { - println("Destroy ALL THE THINGS!!!") - } else { - println("Stroke a kitten") - } -} diff --git a/tests/pending/run/t8611b.flags b/tests/pending/run/t8611b.flags deleted file mode 100644 index 85d8eb2ba..000000000 --- a/tests/pending/run/t8611b.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings diff --git a/tests/pending/run/t8611b.scala b/tests/pending/run/t8611b.scala deleted file mode 100644 index 75114c2ae..000000000 --- a/tests/pending/run/t8611b.scala +++ /dev/null @@ -1,54 +0,0 @@ -sealed trait KrafsDescription - -abstract class NotWorkingEnum extends Enumeration { - - type ExtendedValue = Value with KrafsDescription - - def Enum(inDescription: String): ExtendedValue = { - new Val(nextId) with KrafsDescription { - } - } -} - -abstract class WorkingEnum extends Enumeration { - - type ExtendedValue = Value - - def Enum(inDescription: String): ExtendedValue = { - new Val(nextId) { - } - } -} - -object NotWorkingTab extends NotWorkingEnum { - val a = Enum("A") - val b = Enum("B") -} - -object WorkingTab extends WorkingEnum { - val a = Enum("A") - val b = Enum("B") -} - -object Test extends dotty.runtime.LegacyApp { - testGris() - testWorking() - - def testGris(): Unit = { - val pipp = NotWorkingTab.b - pipp match { - case NotWorkingTab.a => ??? - case NotWorkingTab.b => - case _ => ??? - } - } - - def testWorking(): Unit = { - val stuff = WorkingTab.a - stuff match { - case WorkingTab.a => - case WorkingTab.b => ??? - case _ => ??? - } - } -} |