aboutsummaryrefslogtreecommitdiff
path: root/tests/run
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2017-03-08 13:53:55 +0100
committerGitHub <noreply@github.com>2017-03-08 13:53:55 +0100
commitc84480960cf618c29705dbaab9332d304a081524 (patch)
tree5e0eaa03bb816ab2c7fa21897f5caf201005f88d /tests/run
parent3c4d29eabaa71c30ccc2c7b62517d771d6f9d8f5 (diff)
parenta2b3bc17271a59f4d0f690fd46f3328c55ab06cb (diff)
downloaddotty-c84480960cf618c29705dbaab9332d304a081524.tar.gz
dotty-c84480960cf618c29705dbaab9332d304a081524.tar.bz2
dotty-c84480960cf618c29705dbaab9332d304a081524.zip
Merge pull request #2062 from dotty-staging/fix/scala-reflect-dep
Remove most uses of scala-reflect jar
Diffstat (limited to 'tests/run')
-rw-r--r--tests/run/bytecodecs.scala39
-rw-r--r--tests/run/var-arity-class-symbol.scala19
2 files changed, 0 insertions, 58 deletions
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" })
-}