diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-01-10 07:12:05 -0800 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-01-10 07:12:05 -0800 |
commit | c0ff1700e060b23eddd75712686d93255c8be1ca (patch) | |
tree | d225eacd5155b04cf721f18dda45255f6bfe5dd9 /test/files/run/macroPlugins-namerHooks.scala | |
parent | 5e65754493e87f2be80e910f6866b179eea98cca (diff) | |
parent | 945f8594756d3743487aef7c3387e5d6ce0828de (diff) | |
download | scala-c0ff1700e060b23eddd75712686d93255c8be1ca.tar.gz scala-c0ff1700e060b23eddd75712686d93255c8be1ca.tar.bz2 scala-c0ff1700e060b23eddd75712686d93255c8be1ca.zip |
Merge pull request #3351 from xeno-by/topic/fix-platform-dependent-test
fixes run/macroPlugins-namerHooks.scala
Diffstat (limited to 'test/files/run/macroPlugins-namerHooks.scala')
-rw-r--r-- | test/files/run/macroPlugins-namerHooks.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/files/run/macroPlugins-namerHooks.scala b/test/files/run/macroPlugins-namerHooks.scala index a71d685f7f..302429b19e 100644 --- a/test/files/run/macroPlugins-namerHooks.scala +++ b/test/files/run/macroPlugins-namerHooks.scala @@ -14,19 +14,20 @@ object Test extends DirectTest { import analyzer._ val output = collection.mutable.ListBuffer[String]() + def log(what: String) = output += what.replace(String.format("%n"), " ") object macroPlugin extends MacroPlugin { override def pluginsEnterSym(namer: Namer, tree: Tree): Boolean = { - output += s"enterSym(${tree.toString.replace('\n', ' ')})" + log(s"enterSym($tree)") namer.standardEnterSym(tree) true } override def pluginsEnsureCompanionObject(namer: Namer, cdef: ClassDef, creator: ClassDef => Tree = companionModuleDef(_)): Option[Symbol] = { - output += s"ensureCompanionObject(${cdef.toString.replace('\n', ' ')}, ...)" + log(s"ensureCompanionObject($cdef, ...)") Some(namer.standardEnsureCompanionObject(cdef, creator)) } override def pluginsEnterStats(typer: Typer, stats: List[Tree]): List[Tree] = { - stats.foreach(stat => output += s"enterStat(${stat.toString.replace('\n', ' ')})") + stats.foreach(stat => log(s"enterStat($stat)")) stats } } |