diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-01-23 15:05:35 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-01-23 15:05:35 +0100 |
commit | 6c5d561834b4bd7a84f12f69e282119ce7903d94 (patch) | |
tree | 147f07dda2ef9da1b2b6e4f345a7d1b09622462d /test | |
parent | 035a2eea881b4f9e2fe65891207855bd1ee6e606 (diff) | |
download | scala-6c5d561834b4bd7a84f12f69e282119ce7903d94.tar.gz scala-6c5d561834b4bd7a84f12f69e282119ce7903d94.tar.bz2 scala-6c5d561834b4bd7a84f12f69e282119ce7903d94.zip |
Temporarily disabling debug traces in macro tests
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/macro-range/macro_range_1.scala | 17 | ||||
-rw-r--r-- | test/files/run/macro-range/macro_range_2.scala | 17 |
2 files changed, 22 insertions, 12 deletions
diff --git a/test/files/run/macro-range/macro_range_1.scala b/test/files/run/macro-range/macro_range_1.scala index 15a018fcff..fdfe7169ad 100644 --- a/test/files/run/macro-range/macro_range_1.scala +++ b/test/files/run/macro-range/macro_range_1.scala @@ -29,12 +29,13 @@ abstract class Utils { } } def makeApply(fn: Tree, args: List[Tree]): Tree = fn match { - case Function(vparams, body) => + case Function(vparams, body) => new TreeSubstituter(vparams map (_.symbol), args) transform body case Block(stats, expr) => Block(stats, makeApply(expr, args)) - case _ => - println("no beta on "+fn+" "+fn.getClass) + case _ => + // todo. read the compiler config and print if -Ydebug is set + //println("no beta on "+fn+" "+fn.getClass) Apply(fn, args) } def makeWhile(lname: TermName, cond: Tree, body: Tree): Tree = { @@ -48,7 +49,8 @@ abstract class Utils { class Range(val from: Int, val to: Int) extends RangeDefault { override def macro foreach(f: Int => Unit): Unit = { - println("macro-expand, _this = "+ _this) + // todo. read the compiler config and print if -Ydebug is set + //println("macro-expand, _this = "+ _this) import _context._ object utils extends Utils { val context: _context.type = _context @@ -71,12 +73,15 @@ class Range(val from: Int, val to: Int) extends RangeDefault { val body = Block( List(makeApply(f, List(iref))), Assign(iref, makeBinop(iref, "$plus", Literal(Constant(1))))) - tools.nsc.util.trace("generated: ")( + val generated = Block( List( ValDef(Modifiers(Set(Modifier.mutable)), iname, TypeTree(), lo), ValDef(Modifiers(), hname, TypeTree(), hi)), - makeWhile(labelname, cond, body))) + makeWhile(labelname, cond, body)) + // todo. read the compiler config and print if -Ydebug is set + //tools.nsc.util.trace("generated: ")(generated) + generated case _ => Apply( Select( diff --git a/test/files/run/macro-range/macro_range_2.scala b/test/files/run/macro-range/macro_range_2.scala index 15a018fcff..fdfe7169ad 100644 --- a/test/files/run/macro-range/macro_range_2.scala +++ b/test/files/run/macro-range/macro_range_2.scala @@ -29,12 +29,13 @@ abstract class Utils { } } def makeApply(fn: Tree, args: List[Tree]): Tree = fn match { - case Function(vparams, body) => + case Function(vparams, body) => new TreeSubstituter(vparams map (_.symbol), args) transform body case Block(stats, expr) => Block(stats, makeApply(expr, args)) - case _ => - println("no beta on "+fn+" "+fn.getClass) + case _ => + // todo. read the compiler config and print if -Ydebug is set + //println("no beta on "+fn+" "+fn.getClass) Apply(fn, args) } def makeWhile(lname: TermName, cond: Tree, body: Tree): Tree = { @@ -48,7 +49,8 @@ abstract class Utils { class Range(val from: Int, val to: Int) extends RangeDefault { override def macro foreach(f: Int => Unit): Unit = { - println("macro-expand, _this = "+ _this) + // todo. read the compiler config and print if -Ydebug is set + //println("macro-expand, _this = "+ _this) import _context._ object utils extends Utils { val context: _context.type = _context @@ -71,12 +73,15 @@ class Range(val from: Int, val to: Int) extends RangeDefault { val body = Block( List(makeApply(f, List(iref))), Assign(iref, makeBinop(iref, "$plus", Literal(Constant(1))))) - tools.nsc.util.trace("generated: ")( + val generated = Block( List( ValDef(Modifiers(Set(Modifier.mutable)), iname, TypeTree(), lo), ValDef(Modifiers(), hname, TypeTree(), hi)), - makeWhile(labelname, cond, body))) + makeWhile(labelname, cond, body)) + // todo. read the compiler config and print if -Ydebug is set + //tools.nsc.util.trace("generated: ")(generated) + generated case _ => Apply( Select( |