From 0ba3d542cc236ab2dbed3dc551920ede94787a0c Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sat, 14 Apr 2012 10:33:10 +0200 Subject: restores some disabled macro tests, makes checkFeature synchronous when used for macros --- ...cro-deprecate-dont-touch-backquotedidents.check | 10 ---- ...cro-deprecate-dont-touch-backquotedidents.flags | 1 - ...cro-deprecate-dont-touch-backquotedidents.scala | 56 ---------------------- test/disabled/neg/macro-deprecate-idents.check | 46 ------------------ test/disabled/neg/macro-deprecate-idents.flags | 1 - test/disabled/neg/macro-deprecate-idents.scala | 56 ---------------------- test/disabled/neg/macro-invalidshape-d.check | 4 -- test/disabled/neg/macro-invalidshape-d.flags | 1 - .../neg/macro-invalidshape-d/Impls_1.scala | 5 -- .../neg/macro-invalidshape-d/Macros_Test_2.scala | 8 ---- test/disabled/neg/macro-keyword-bind.flags | 2 +- test/disabled/neg/macro-keyword-class1.flags | 2 +- test/disabled/neg/macro-keyword-class2.flags | 2 +- test/disabled/neg/macro-keyword-object1.flags | 2 +- test/disabled/neg/macro-keyword-object2.flags | 2 +- test/disabled/neg/macro-keyword-package1.flags | 2 +- test/disabled/neg/macro-keyword-package2.flags | 2 +- test/disabled/neg/macro-keyword-trait1.flags | 2 +- test/disabled/neg/macro-keyword-trait2.flags | 2 +- test/disabled/neg/macro-keyword-type.flags | 2 +- test/disabled/neg/macro-keyword-val.flags | 2 +- test/disabled/neg/macro-without-xmacros-a.check | 10 ---- .../neg/macro-without-xmacros-a/Impls_1.scala | 18 ------- .../neg/macro-without-xmacros-a/Macros_2.scala | 12 ----- .../neg/macro-without-xmacros-a/Test_3.scala | 4 -- test/disabled/neg/macro-without-xmacros-b.check | 10 ---- .../neg/macro-without-xmacros-b/Impls_1.scala | 18 ------- .../neg/macro-without-xmacros-b/Macros_2.scala | 10 ---- .../neg/macro-without-xmacros-b/Test_3.scala | 4 -- 29 files changed, 11 insertions(+), 285 deletions(-) delete mode 100644 test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.check delete mode 100644 test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.flags delete mode 100644 test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.scala delete mode 100644 test/disabled/neg/macro-deprecate-idents.check delete mode 100644 test/disabled/neg/macro-deprecate-idents.flags delete mode 100644 test/disabled/neg/macro-deprecate-idents.scala delete mode 100644 test/disabled/neg/macro-invalidshape-d.check delete mode 100644 test/disabled/neg/macro-invalidshape-d.flags delete mode 100644 test/disabled/neg/macro-invalidshape-d/Impls_1.scala delete mode 100644 test/disabled/neg/macro-invalidshape-d/Macros_Test_2.scala delete mode 100644 test/disabled/neg/macro-without-xmacros-a.check delete mode 100644 test/disabled/neg/macro-without-xmacros-a/Impls_1.scala delete mode 100644 test/disabled/neg/macro-without-xmacros-a/Macros_2.scala delete mode 100644 test/disabled/neg/macro-without-xmacros-a/Test_3.scala delete mode 100644 test/disabled/neg/macro-without-xmacros-b.check delete mode 100644 test/disabled/neg/macro-without-xmacros-b/Impls_1.scala delete mode 100644 test/disabled/neg/macro-without-xmacros-b/Macros_2.scala delete mode 100644 test/disabled/neg/macro-without-xmacros-b/Test_3.scala (limited to 'test/disabled/neg') diff --git a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.check b/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.check deleted file mode 100644 index 25df9a6a4a..0000000000 --- a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.check +++ /dev/null @@ -1,10 +0,0 @@ -macro-deprecate-dont-touch-backquotedidents.scala:37: error: in future versions of Scala "macro" will be a keyword. consider using a different name. -package `macro` { - ^ -macro-deprecate-dont-touch-backquotedidents.scala:38: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - package `macro`.bar { - ^ -macro-deprecate-dont-touch-backquotedidents.scala:43: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - package `macro`.foo { - ^ -three errors found diff --git a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.flags b/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.flags deleted file mode 100644 index e8fb65d50c..0000000000 --- a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings \ No newline at end of file diff --git a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.scala b/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.scala deleted file mode 100644 index dee2f1de3b..0000000000 --- a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.scala +++ /dev/null @@ -1,56 +0,0 @@ -object Test1 { - val `macro` = ??? -} - -object Test2 { - var `macro` = ??? -} - -object Test3 { - type `macro` = Int -} - -package test4 { - class `macro` -} - -object Test5 { - class `macro` -} - -package test6 { - object `macro` -} - -object Test7 { - object `macro` -} - -package test8 { - trait `macro` -} - -object Test9 { - trait `macro` -} - -package `macro` { - package `macro`.bar { - } -} - -package foo { - package `macro`.foo { - } -} - -object Test12 { - val Some(`macro`) = Some(42) - `macro` match { - case `macro` => println(`macro`) - } -} - -object Test13 { - def `macro` = 2 -} \ No newline at end of file diff --git a/test/disabled/neg/macro-deprecate-idents.check b/test/disabled/neg/macro-deprecate-idents.check deleted file mode 100644 index bd685fc7b9..0000000000 --- a/test/disabled/neg/macro-deprecate-idents.check +++ /dev/null @@ -1,46 +0,0 @@ -macro-deprecate-idents.scala:2: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - val macro = ??? - ^ -macro-deprecate-idents.scala:6: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - var macro = ??? - ^ -macro-deprecate-idents.scala:10: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - type macro = Int - ^ -macro-deprecate-idents.scala:14: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - class macro - ^ -macro-deprecate-idents.scala:18: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - class macro - ^ -macro-deprecate-idents.scala:22: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - object macro - ^ -macro-deprecate-idents.scala:26: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - object macro - ^ -macro-deprecate-idents.scala:30: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - trait macro - ^ -macro-deprecate-idents.scala:34: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - trait macro - ^ -macro-deprecate-idents.scala:37: error: in future versions of Scala "macro" will be a keyword. consider using a different name. -package macro { - ^ -macro-deprecate-idents.scala:38: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - package macro.bar { - ^ -macro-deprecate-idents.scala:43: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - package macro.foo { - ^ -macro-deprecate-idents.scala:48: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - val Some(macro) = Some(42) - ^ -macro-deprecate-idents.scala:50: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - case macro => println(macro) - ^ -macro-deprecate-idents.scala:55: error: in future versions of Scala "macro" will be a keyword. consider using a different name. - def macro = 2 - ^ -15 errors found diff --git a/test/disabled/neg/macro-deprecate-idents.flags b/test/disabled/neg/macro-deprecate-idents.flags deleted file mode 100644 index e8fb65d50c..0000000000 --- a/test/disabled/neg/macro-deprecate-idents.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings \ No newline at end of file diff --git a/test/disabled/neg/macro-deprecate-idents.scala b/test/disabled/neg/macro-deprecate-idents.scala deleted file mode 100644 index 23c398e341..0000000000 --- a/test/disabled/neg/macro-deprecate-idents.scala +++ /dev/null @@ -1,56 +0,0 @@ -object Test1 { - val macro = ??? -} - -object Test2 { - var macro = ??? -} - -object Test3 { - type macro = Int -} - -package test4 { - class macro -} - -object Test5 { - class macro -} - -package test6 { - object macro -} - -object Test7 { - object macro -} - -package test8 { - trait macro -} - -object Test9 { - trait macro -} - -package macro { - package macro.bar { - } -} - -package foo { - package macro.foo { - } -} - -object Test12 { - val Some(macro) = Some(42) - macro match { - case macro => println(macro) - } -} - -object Test13 { - def macro = 2 -} \ No newline at end of file diff --git a/test/disabled/neg/macro-invalidshape-d.check b/test/disabled/neg/macro-invalidshape-d.check deleted file mode 100644 index 031aa653ab..0000000000 --- a/test/disabled/neg/macro-invalidshape-d.check +++ /dev/null @@ -1,4 +0,0 @@ -Macros_Test_2.scala:2: error: illegal start of statement - def foo(x: Any) = {2; macro Impls.foo} - ^ -one error found diff --git a/test/disabled/neg/macro-invalidshape-d.flags b/test/disabled/neg/macro-invalidshape-d.flags deleted file mode 100644 index cd66464f2f..0000000000 --- a/test/disabled/neg/macro-invalidshape-d.flags +++ /dev/null @@ -1 +0,0 @@ --language:experimental.macros \ No newline at end of file diff --git a/test/disabled/neg/macro-invalidshape-d/Impls_1.scala b/test/disabled/neg/macro-invalidshape-d/Impls_1.scala deleted file mode 100644 index 7b1620d117..0000000000 --- a/test/disabled/neg/macro-invalidshape-d/Impls_1.scala +++ /dev/null @@ -1,5 +0,0 @@ -import scala.reflect.makro.{Context => Ctx} - -object Impls { - def foo(c: Ctx)(x: c.Expr[Any]) = ??? -} diff --git a/test/disabled/neg/macro-invalidshape-d/Macros_Test_2.scala b/test/disabled/neg/macro-invalidshape-d/Macros_Test_2.scala deleted file mode 100644 index bacd9a6e7c..0000000000 --- a/test/disabled/neg/macro-invalidshape-d/Macros_Test_2.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Macros { - def foo(x: Any) = {2; macro Impls.foo} -} - -object Test extends App { - import Macros._ - foo(42) -} \ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-bind.flags b/test/disabled/neg/macro-keyword-bind.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-bind.flags +++ b/test/disabled/neg/macro-keyword-bind.flags @@ -1 +1 @@ --Xmacros \ No newline at end of file +-language:experimental.macros \ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-class1.flags b/test/disabled/neg/macro-keyword-class1.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-class1.flags +++ b/test/disabled/neg/macro-keyword-class1.flags @@ -1 +1 @@ --Xmacros \ No newline at end of file +-language:experimental.macros \ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-class2.flags b/test/disabled/neg/macro-keyword-class2.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-class2.flags +++ b/test/disabled/neg/macro-keyword-class2.flags @@ -1 +1 @@ --Xmacros \ No newline at end of file +-language:experimental.macros \ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-object1.flags b/test/disabled/neg/macro-keyword-object1.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-object1.flags +++ b/test/disabled/neg/macro-keyword-object1.flags @@ -1 +1 @@ --Xmacros \ No newline at end of file +-language:experimental.macros \ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-object2.flags b/test/disabled/neg/macro-keyword-object2.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-object2.flags +++ b/test/disabled/neg/macro-keyword-object2.flags @@ -1 +1 @@ --Xmacros \ No newline at end of file +-language:experimental.macros \ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-package1.flags b/test/disabled/neg/macro-keyword-package1.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-package1.flags +++ b/test/disabled/neg/macro-keyword-package1.flags @@ -1 +1 @@ --Xmacros \ No newline at end of file +-language:experimental.macros \ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-package2.flags b/test/disabled/neg/macro-keyword-package2.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-package2.flags +++ b/test/disabled/neg/macro-keyword-package2.flags @@ -1 +1 @@ --Xmacros \ No newline at end of file +-language:experimental.macros \ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-trait1.flags b/test/disabled/neg/macro-keyword-trait1.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-trait1.flags +++ b/test/disabled/neg/macro-keyword-trait1.flags @@ -1 +1 @@ --Xmacros \ No newline at end of file +-language:experimental.macros \ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-trait2.flags b/test/disabled/neg/macro-keyword-trait2.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-trait2.flags +++ b/test/disabled/neg/macro-keyword-trait2.flags @@ -1 +1 @@ --Xmacros \ No newline at end of file +-language:experimental.macros \ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-type.flags b/test/disabled/neg/macro-keyword-type.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-type.flags +++ b/test/disabled/neg/macro-keyword-type.flags @@ -1 +1 @@ --Xmacros \ No newline at end of file +-language:experimental.macros \ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-val.flags b/test/disabled/neg/macro-keyword-val.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-val.flags +++ b/test/disabled/neg/macro-keyword-val.flags @@ -1 +1 @@ --Xmacros \ No newline at end of file +-language:experimental.macros \ No newline at end of file diff --git a/test/disabled/neg/macro-without-xmacros-a.check b/test/disabled/neg/macro-without-xmacros-a.check deleted file mode 100644 index a3ca081f04..0000000000 --- a/test/disabled/neg/macro-without-xmacros-a.check +++ /dev/null @@ -1,10 +0,0 @@ -Macros_2.scala:5: error: not found: value macro - def foo(x: Int): Int = macro foo_impl - ^ -Macros_2.scala:7: error: not found: value macro - def bar(x: Int): Int = macro bar_impl - ^ -Macros_2.scala:11: error: not found: value macro - def quux(x: Int): Int = macro quux_impl - ^ -three errors found diff --git a/test/disabled/neg/macro-without-xmacros-a/Impls_1.scala b/test/disabled/neg/macro-without-xmacros-a/Impls_1.scala deleted file mode 100644 index 2493c81c95..0000000000 --- a/test/disabled/neg/macro-without-xmacros-a/Impls_1.scala +++ /dev/null @@ -1,18 +0,0 @@ -import scala.reflect.makro.{Context => Ctx} - -object Impls { - def foo_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = { - import c.mirror._ - Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1)))) - } - - def bar_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = { - import c.mirror._ - Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2)))) - } - - def quux_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = { - import c.mirror._ - Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3)))) - } -} diff --git a/test/disabled/neg/macro-without-xmacros-a/Macros_2.scala b/test/disabled/neg/macro-without-xmacros-a/Macros_2.scala deleted file mode 100644 index 62f9dcf505..0000000000 --- a/test/disabled/neg/macro-without-xmacros-a/Macros_2.scala +++ /dev/null @@ -1,12 +0,0 @@ -import Impls._ - -object Macros { - object Shmacros { - def foo(x: Int): Int = macro foo_impl - } - def bar(x: Int): Int = macro bar_impl -} - -class Macros { - def quux(x: Int): Int = macro quux_impl -} \ No newline at end of file diff --git a/test/disabled/neg/macro-without-xmacros-a/Test_3.scala b/test/disabled/neg/macro-without-xmacros-a/Test_3.scala deleted file mode 100644 index e9a10e20c9..0000000000 --- a/test/disabled/neg/macro-without-xmacros-a/Test_3.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Test extends App { - import Macros.Shmacros._ - println(foo(2) + Macros.bar(2) * new Macros().quux(4)) -} \ No newline at end of file diff --git a/test/disabled/neg/macro-without-xmacros-b.check b/test/disabled/neg/macro-without-xmacros-b.check deleted file mode 100644 index dce4a084c9..0000000000 --- a/test/disabled/neg/macro-without-xmacros-b.check +++ /dev/null @@ -1,10 +0,0 @@ -Macros_2.scala:3: error: ';' expected but '.' found. - def foo(x: Int): Int = macro Impls.foo_impl - ^ -Macros_2.scala:5: error: ';' expected but '.' found. - def bar(x: Int): Int = macro Impls.bar_impl - ^ -Macros_2.scala:9: error: ';' expected but '.' found. - def quux(x: Int): Int = macro Impls.quux_impl - ^ -three errors found diff --git a/test/disabled/neg/macro-without-xmacros-b/Impls_1.scala b/test/disabled/neg/macro-without-xmacros-b/Impls_1.scala deleted file mode 100644 index 2493c81c95..0000000000 --- a/test/disabled/neg/macro-without-xmacros-b/Impls_1.scala +++ /dev/null @@ -1,18 +0,0 @@ -import scala.reflect.makro.{Context => Ctx} - -object Impls { - def foo_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = { - import c.mirror._ - Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1)))) - } - - def bar_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = { - import c.mirror._ - Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2)))) - } - - def quux_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = { - import c.mirror._ - Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3)))) - } -} diff --git a/test/disabled/neg/macro-without-xmacros-b/Macros_2.scala b/test/disabled/neg/macro-without-xmacros-b/Macros_2.scala deleted file mode 100644 index de7080c7e8..0000000000 --- a/test/disabled/neg/macro-without-xmacros-b/Macros_2.scala +++ /dev/null @@ -1,10 +0,0 @@ -object Macros { - object Shmacros { - def foo(x: Int): Int = macro Impls.foo_impl - } - def bar(x: Int): Int = macro Impls.bar_impl -} - -class Macros { - def quux(x: Int): Int = macro Impls.quux_impl -} \ No newline at end of file diff --git a/test/disabled/neg/macro-without-xmacros-b/Test_3.scala b/test/disabled/neg/macro-without-xmacros-b/Test_3.scala deleted file mode 100644 index e9a10e20c9..0000000000 --- a/test/disabled/neg/macro-without-xmacros-b/Test_3.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Test extends App { - import Macros.Shmacros._ - println(foo(2) + Macros.bar(2) * new Macros().quux(4)) -} \ No newline at end of file -- cgit v1.2.3