diff options
author | Paul Phillips <paulp@improving.org> | 2013-05-19 09:43:04 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-05-19 11:35:49 -0700 |
commit | b6757e11a1970480a60741235fc86f01d8957e07 (patch) | |
tree | 4ddcb529684f504d44e017f8aebf441d32865844 /src/interactive | |
parent | 16e92f48e7b075d8addf037953b5696a497258c6 (diff) | |
download | scala-b6757e11a1970480a60741235fc86f01d8957e07.tar.gz scala-b6757e11a1970480a60741235fc86f01d8957e07.tar.bz2 scala-b6757e11a1970480a60741235fc86f01d8957e07.zip |
An attempt to make tests deterministic.
The nondeterminism presently showing itself in
presentation/implicit-member is a consequence of the
presentation compiler tests relying on details of the
behavior of toString calls. We need to stomp this out,
but it will take a while. Based on the check file
changes enclosed with this commit, this will suffice
for the presentation compiler tests. A broader assault
will have to take place, but not yet.
Diffstat (limited to 'src/interactive')
-rw-r--r-- | src/interactive/scala/tools/nsc/interactive/CompilerControl.scala | 5 | ||||
-rw-r--r-- | src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/interactive/scala/tools/nsc/interactive/CompilerControl.scala b/src/interactive/scala/tools/nsc/interactive/CompilerControl.scala index c38c7c8257..d036a6e853 100644 --- a/src/interactive/scala/tools/nsc/interactive/CompilerControl.scala +++ b/src/interactive/scala/tools/nsc/interactive/CompilerControl.scala @@ -297,6 +297,11 @@ trait CompilerControl { self: Global => def implicitlyAdded = false private def accessible_s = if (accessible) "" else "[inaccessible] " + def forceInfoString = { + definitions.fullyInitializeSymbol(sym) + definitions.fullyInitializeType(tpe) + infoString + } def infoString = s"$accessible_s${sym.defStringSeenAs(tpe)}" } diff --git a/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala b/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala index 08d84af8f5..e28bf20745 100644 --- a/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala +++ b/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala @@ -27,7 +27,7 @@ private[tests] trait CoreTestDefs reporter.println("retrieved %d members".format(members.size)) compiler ask { () => val filtered = members.filterNot(member => (member.sym.name string_== "getClass") || member.sym.isConstructor) - reporter println (filtered.map(_.infoString).sorted mkString "\n") + reporter println (filtered.map(_.forceInfoString).sorted mkString "\n") } } } |