From 945f8594756d3743487aef7c3387e5d6ce0828de Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Fri, 10 Jan 2014 13:58:34 +0100 Subject: fixes run/macroPlugins-namerHooks.scala Makes run/macroPlugins-namerHooks.scala work equally well on both Unix and Windows machines. --- test/files/run/macroPlugins-namerHooks.scala | 7 ++++--- 1 file 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 } } -- cgit v1.2.3