From 739a730954e399e7a431b852410f684d0c92fb2f Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Mon, 6 Mar 2017 04:16:36 +0900 Subject: Disable most tests that depend on scala-reflect --- tests/run/bytecodecs.scala | 39 ---------------------------------- tests/run/var-arity-class-symbol.scala | 19 ----------------- 2 files changed, 58 deletions(-) delete mode 100644 tests/run/bytecodecs.scala delete mode 100644 tests/run/var-arity-class-symbol.scala (limited to 'tests/run') diff --git a/tests/run/bytecodecs.scala b/tests/run/bytecodecs.scala deleted file mode 100644 index 454958dfa..000000000 --- a/tests/run/bytecodecs.scala +++ /dev/null @@ -1,39 +0,0 @@ -import scala.reflect.internal.pickling.ByteCodecs._ - -object Test { - - def test8to7(xs: Array[Byte]): Unit = { - val ys = encode8to7(xs) - decode7to8(ys, ys.length) - assert(ys.take(xs.length).deep == xs.deep, - "test8to7("+xs.deep+") failed, result = "+ys.take(xs.length).deep) - } - - def testAll(xs: Array[Byte]): Unit = { - val ys = encode(xs) - decode(ys) - assert(ys.take(xs.length).deep == xs.deep, - "testAll("+xs.deep+") failed, result = "+ys.take(xs.length).deep) - } - - def test(inputs: Array[Byte]*): Unit = { - for (input <- inputs) { - test8to7(input) - testAll(input) - } - } - - def main(args: Array[String]): Unit = { - test( - Array(1, 2, 3), - Array(1, 2, 3, 4, 5, 6, 7), - Array(1, -2, 0, -3, -5, -6, -7), - Array(1, 3, -1, -128, 0, 0, -128, 1, 2, 3)) - val rand = new scala.util.Random() - for (i <- 1 until 5000) { - var xs = new Array[Byte](i) - rand.nextBytes(xs) - test(xs) - } - } -} diff --git a/tests/run/var-arity-class-symbol.scala b/tests/run/var-arity-class-symbol.scala deleted file mode 100644 index 2a7d32987..000000000 --- a/tests/run/var-arity-class-symbol.scala +++ /dev/null @@ -1,19 +0,0 @@ -import scala.reflect.runtime.universe._, definitions._ -object Test extends dotty.runtime.LegacyApp { - // Tuples - assert(TupleClass.seq.size == 22) - assert(TupleClass(0) == NoSymbol) - assert(TupleClass(23) == NoSymbol) - assert((1 to 22).forall { i => TupleClass(i).name.toString == s"Tuple$i" }) - // Functions - assert(FunctionClass.seq.size == 23) - assert(FunctionClass(-1) == NoSymbol) - assert(FunctionClass(23) == NoSymbol) - assert((0 to 22).forall { i => FunctionClass(i).name.toString == s"Function$i" }) - // Products - assert(ProductClass.seq.size == 23) - assert(ProductClass(-1) == NoSymbol) - assert(ProductClass(0) == UnitClass) - assert(ProductClass(23) == NoSymbol) - assert((1 to 22).forall { i => ProductClass(i).name.toString == s"Product$i" }) -} -- cgit v1.2.3