diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-01-10 13:58:34 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-01-10 13:58:34 +0100 |
commit | 945f8594756d3743487aef7c3387e5d6ce0828de (patch) | |
tree | b2ecf64012bdc08dd4a9bb8d025d68e327a101e0 /test/files/run | |
parent | e089cafb5fd02e2457bafde3252da3a771d3180e (diff) | |
download | scala-945f8594756d3743487aef7c3387e5d6ce0828de.tar.gz scala-945f8594756d3743487aef7c3387e5d6ce0828de.tar.bz2 scala-945f8594756d3743487aef7c3387e5d6ce0828de.zip |
fixes run/macroPlugins-namerHooks.scala
Makes run/macroPlugins-namerHooks.scala work equally well on both
Unix and Windows machines.
Diffstat (limited to 'test/files/run')
-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 } } |