summaryrefslogtreecommitdiff
path: root/test/pending/run
diff options
context:
space:
mode:
authorDen Shabalin <den.shabalin@gmail.com>2012-12-11 18:17:56 +0100
committerEugene Burmako <xeno.by@gmail.com>2012-12-25 01:58:44 +0100
commiteea635a1c60a72a8a465fbf2cd659442c6b763ea (patch)
tree1e3cee1544438965a5283fa810730493124d80a0 /test/pending/run
parent136bf70d79df1d8a65b98e094bbbc26cb5e3a96b (diff)
downloadscala-eea635a1c60a72a8a465fbf2cd659442c6b763ea.tar.gz
scala-eea635a1c60a72a8a465fbf2cd659442c6b763ea.tar.bz2
scala-eea635a1c60a72a8a465fbf2cd659442c6b763ea.zip
Changes reflection tests to use shorter name constructors
Diffstat (limited to 'test/pending/run')
-rw-r--r--test/pending/run/hk-lub-fail.scala10
-rw-r--r--test/pending/run/macro-expand-default/Impls_1.scala4
-rw-r--r--test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala4
-rw-r--r--test/pending/run/macro-expand-named/Impls_1.scala4
-rw-r--r--test/pending/run/macro-expand-tparams-prefix-e1/Impls_1.scala6
-rw-r--r--test/pending/run/macro-expand-tparams-prefix-f1/Impls_1.scala6
-rw-r--r--test/pending/run/macro-reify-tagless-b/Test_2.scala6
-rw-r--r--test/pending/run/t5427a.scala2
-rw-r--r--test/pending/run/t5427b.scala2
-rw-r--r--test/pending/run/t5427c.scala2
-rw-r--r--test/pending/run/t5427d.scala2
11 files changed, 24 insertions, 24 deletions
diff --git a/test/pending/run/hk-lub-fail.scala b/test/pending/run/hk-lub-fail.scala
index b58a86ee75..0ac4fdd841 100644
--- a/test/pending/run/hk-lub-fail.scala
+++ b/test/pending/run/hk-lub-fail.scala
@@ -25,12 +25,12 @@ object Test {
// A repl session to get you started.
/*
- val quux1 = EmptyPackageClass.tpe.member(newTermName("Quux1"))
- val quux2 = EmptyPackageClass.tpe.member(newTermName("Quux2"))
+ val quux1 = EmptyPackageClass.tpe.member(TermName("Quux1"))
+ val quux2 = EmptyPackageClass.tpe.member(TermName("Quux2"))
val tps = List(quux1, quux2) map (_.tpe)
- val test = EmptyPackageClass.tpe.member(newTermName("Test"))
- val f = test.tpe.member(newTypeName("F")).tpe
-
+ val test = EmptyPackageClass.tpe.member(TermName("Test"))
+ val f = test.tpe.member(TypeName("F")).tpe
+
val fn = f.normalize.asInstanceOf[ExistentialType]
val fn2 = fn.underlying.asInstanceOf[TypeRef]
*/
diff --git a/test/pending/run/macro-expand-default/Impls_1.scala b/test/pending/run/macro-expand-default/Impls_1.scala
index 7cf8d59c75..bb55f02ab2 100644
--- a/test/pending/run/macro-expand-default/Impls_1.scala
+++ b/test/pending/run/macro-expand-default/Impls_1.scala
@@ -3,8 +3,8 @@ import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int], y: c.Expr[Int]) = {
import c.universe._
- val sum = Apply(Select(x.tree, newTermName("$minus")), List(y.tree))
- val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(sum))
+ val sum = Apply(Select(x.tree, TermName("$minus")), List(y.tree))
+ val body = Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(sum))
Expr[Unit](body)
}
} \ No newline at end of file
diff --git a/test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala b/test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala
index be00fd0d8a..eed68280cd 100644
--- a/test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala
+++ b/test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala
@@ -3,8 +3,8 @@ import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U](c: Ctx)(x: c.Expr[U])(evidence: c.Expr[Numeric[U]]) = {
import c.universe._
- val plusOne = Apply(Select(evidence.tree, newTermName("plus")), List(x.tree, Literal(Constant(1))))
- val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(plusOne))
+ val plusOne = Apply(Select(evidence.tree, TermName("plus")), List(x.tree, Literal(Constant(1))))
+ val body = Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(plusOne))
Expr[Unit](body)
}
} \ No newline at end of file
diff --git a/test/pending/run/macro-expand-named/Impls_1.scala b/test/pending/run/macro-expand-named/Impls_1.scala
index 7cf8d59c75..bb55f02ab2 100644
--- a/test/pending/run/macro-expand-named/Impls_1.scala
+++ b/test/pending/run/macro-expand-named/Impls_1.scala
@@ -3,8 +3,8 @@ import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int], y: c.Expr[Int]) = {
import c.universe._
- val sum = Apply(Select(x.tree, newTermName("$minus")), List(y.tree))
- val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(sum))
+ val sum = Apply(Select(x.tree, TermName("$minus")), List(y.tree))
+ val body = Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(sum))
Expr[Unit](body)
}
} \ No newline at end of file
diff --git a/test/pending/run/macro-expand-tparams-prefix-e1/Impls_1.scala b/test/pending/run/macro-expand-tparams-prefix-e1/Impls_1.scala
index 26de70cc12..487ac79673 100644
--- a/test/pending/run/macro-expand-tparams-prefix-e1/Impls_1.scala
+++ b/test/pending/run/macro-expand-tparams-prefix-e1/Impls_1.scala
@@ -4,9 +4,9 @@ object Impls {
def foo[T, U: c.WeakTypeTag, V](c: Ctx)(implicit T: c.WeakTypeTag[T], V: c.WeakTypeTag[V]): c.Expr[Unit] = {
import c.universe._
Block(List(
- Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(T.toString)))),
- Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(implicitly[c.WeakTypeTag[U]].toString)))),
- Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(V.toString))))),
+ Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(Literal(Constant(T.toString)))),
+ Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(Literal(Constant(implicitly[c.WeakTypeTag[U]].toString)))),
+ Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(Literal(Constant(V.toString))))),
Literal(Constant(())))
}
} \ No newline at end of file
diff --git a/test/pending/run/macro-expand-tparams-prefix-f1/Impls_1.scala b/test/pending/run/macro-expand-tparams-prefix-f1/Impls_1.scala
index 26de70cc12..487ac79673 100644
--- a/test/pending/run/macro-expand-tparams-prefix-f1/Impls_1.scala
+++ b/test/pending/run/macro-expand-tparams-prefix-f1/Impls_1.scala
@@ -4,9 +4,9 @@ object Impls {
def foo[T, U: c.WeakTypeTag, V](c: Ctx)(implicit T: c.WeakTypeTag[T], V: c.WeakTypeTag[V]): c.Expr[Unit] = {
import c.universe._
Block(List(
- Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(T.toString)))),
- Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(implicitly[c.WeakTypeTag[U]].toString)))),
- Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(V.toString))))),
+ Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(Literal(Constant(T.toString)))),
+ Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(Literal(Constant(implicitly[c.WeakTypeTag[U]].toString)))),
+ Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(Literal(Constant(V.toString))))),
Literal(Constant(())))
}
} \ No newline at end of file
diff --git a/test/pending/run/macro-reify-tagless-b/Test_2.scala b/test/pending/run/macro-reify-tagless-b/Test_2.scala
index 10487b1515..09ca6ba30e 100644
--- a/test/pending/run/macro-reify-tagless-b/Test_2.scala
+++ b/test/pending/run/macro-reify-tagless-b/Test_2.scala
@@ -6,8 +6,8 @@ object Test extends App {
import scala.reflect.runtime.{currentMirror => cm}
import scala.tools.reflect.ToolBox
val tpt = AppliedTypeTree(Ident(definitions.ListClass), List(Ident(definitions.StringClass)))
- val rhs = Apply(Select(Ident(newTermName("Macros")), newTermName("foo")), List(Literal(Constant("hello world"))))
- val list = ValDef(NoMods, newTermName("list"), tpt, rhs)
- val tree = Block(list, Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Ident(list.name))))
+ val rhs = Apply(Select(Ident(TermName("Macros")), TermName("foo")), List(Literal(Constant("hello world"))))
+ val list = ValDef(NoMods, TermName("list"), tpt, rhs)
+ val tree = Block(list, Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(Ident(list.name))))
println(cm.mkToolBox().eval(tree))
}
diff --git a/test/pending/run/t5427a.scala b/test/pending/run/t5427a.scala
index f7cd05158d..a7d20922db 100644
--- a/test/pending/run/t5427a.scala
+++ b/test/pending/run/t5427a.scala
@@ -4,7 +4,7 @@ object Foo { val bar = 2 }
object Test extends App {
val tpe = getType(Foo)
- val bar = tpe.nonPrivateMember(newTermName("bar"))
+ val bar = tpe.nonPrivateMember(TermName("bar"))
val value = getValue(Foo, bar)
println(value)
} \ No newline at end of file
diff --git a/test/pending/run/t5427b.scala b/test/pending/run/t5427b.scala
index e80bd12369..af1ae6ea2f 100644
--- a/test/pending/run/t5427b.scala
+++ b/test/pending/run/t5427b.scala
@@ -5,7 +5,7 @@ class Foo { val bar = 2 }
object Test extends App {
val foo = new Foo
val tpe = getType(foo)
- val bar = tpe.nonPrivateMember(newTermName("bar"))
+ val bar = tpe.nonPrivateMember(TermName("bar"))
val value = getValue(foo, bar)
println(value)
} \ No newline at end of file
diff --git a/test/pending/run/t5427c.scala b/test/pending/run/t5427c.scala
index 7095158e85..ba71803080 100644
--- a/test/pending/run/t5427c.scala
+++ b/test/pending/run/t5427c.scala
@@ -5,7 +5,7 @@ class Foo(bar: Int)
object Test extends App {
val foo = new Foo(2)
val tpe = getType(foo)
- val bar = tpe.nonPrivateMember(newTermName("bar"))
+ val bar = tpe.nonPrivateMember(TermName("bar"))
bar match {
case NoSymbol => println("no public member")
case _ => println("i'm screwed")
diff --git a/test/pending/run/t5427d.scala b/test/pending/run/t5427d.scala
index f0cc07d27e..1d37dbdde3 100644
--- a/test/pending/run/t5427d.scala
+++ b/test/pending/run/t5427d.scala
@@ -5,7 +5,7 @@ class Foo(val bar: Int)
object Test extends App {
val foo = new Foo(2)
val tpe = getType(foo)
- val bar = tpe.nonPrivateMember(newTermName("bar"))
+ val bar = tpe.nonPrivateMember(TermName("bar"))
val value = getValue(foo, bar)
println(value)
} \ No newline at end of file