summaryrefslogtreecommitdiff
path: root/test/files/presentation
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-02-20 22:46:08 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-02-20 22:48:34 -0800
commit9712cd07ea5bd9acd34d4e7f5ba2180dbdee7fee (patch)
treef432c928c34d95ed3a434cf0673828282d93bd5a /test/files/presentation
parent70956e560a11996e1d801d59b312dfe9d56b7a74 (diff)
parent2952d0fa020c003e919dff0eea0bc63f7d52fba8 (diff)
downloadscala-9712cd07ea5bd9acd34d4e7f5ba2180dbdee7fee.tar.gz
scala-9712cd07ea5bd9acd34d4e7f5ba2180dbdee7fee.tar.bz2
scala-9712cd07ea5bd9acd34d4e7f5ba2180dbdee7fee.zip
Merge 2.10.x into master.
Conflicts: build.number src/compiler/scala/tools/nsc/doc/base/MemberLookupBase.scala src/compiler/scala/tools/nsc/typechecker/Macros.scala test/files/presentation/doc/doc.scala
Diffstat (limited to 'test/files/presentation')
-rwxr-xr-xtest/files/presentation/doc/doc.scala22
-rw-r--r--test/files/presentation/ide-t1000567.check1
-rw-r--r--test/files/presentation/ide-t1000567/Runner.scala15
-rw-r--r--test/files/presentation/ide-t1000567/src/a/a.scala5
-rw-r--r--test/files/presentation/ide-t1000567/src/b/b.scala5
-rw-r--r--test/files/presentation/memory-leaks/MemoryLeaksTest.scala2
6 files changed, 37 insertions, 13 deletions
diff --git a/test/files/presentation/doc/doc.scala b/test/files/presentation/doc/doc.scala
index 21eabeb284..f9ebd09876 100755
--- a/test/files/presentation/doc/doc.scala
+++ b/test/files/presentation/doc/doc.scala
@@ -7,8 +7,6 @@ import scala.tools.nsc.util._
import scala.tools.nsc.io._
object Test extends InteractiveTest {
- override val settings: doc.Settings = docSettings
-
val tags = Seq(
"@example `\"abb\".permutations = Iterator(abb, bab, bba)`",
"@version 1.0, 09/07/2012",
@@ -29,23 +27,23 @@ object Test extends InteractiveTest {
|class User(c: %sCommented)""".stripMargin.format(comment, tags take nTags mkString "\n", caret)
override lazy val compiler = {
- new {
- override val settings = {
- prepareSettings(Test.this.settings)
- Test.this.settings
- }
- } with Global(settings, compilerReporter) with MemberLookupBase with CommentFactoryBase {
+ prepareSettings(settings)
+ new Global(settings, compilerReporter) with MemberLookupBase with CommentFactoryBase {
outer =>
-
val global: this.type = this
- def chooseLink(links: List[LinkTo]): LinkTo = links.head
- def internalLink(sym: Symbol, site: Symbol) = None
- def toString(link: LinkTo) = link.toString
override lazy val analyzer = new {
val global: outer.type = outer
} with doc.ScaladocAnalyzer
+ def chooseLink(links: List[LinkTo]): LinkTo = links.head
+ def internalLink(sym: Symbol, site: Symbol) = None
+ def toString(link: LinkTo) = link.toString
+ def warnNoLink = false
+ def findExternalLink(sym: Symbol, name: String) = None
+
+ override def forScaladoc = true
+
def getComment(sym: Symbol, source: SourceFile) = {
val docResponse = new Response[(String, String, Position)]
askDocComment(sym, sym.owner, source, docResponse)
diff --git a/test/files/presentation/ide-t1000567.check b/test/files/presentation/ide-t1000567.check
new file mode 100644
index 0000000000..6d62cb3e13
--- /dev/null
+++ b/test/files/presentation/ide-t1000567.check
@@ -0,0 +1 @@
+reload: a.scala, b.scala
diff --git a/test/files/presentation/ide-t1000567/Runner.scala b/test/files/presentation/ide-t1000567/Runner.scala
new file mode 100644
index 0000000000..77a618b60a
--- /dev/null
+++ b/test/files/presentation/ide-t1000567/Runner.scala
@@ -0,0 +1,15 @@
+import scala.tools.nsc.interactive.tests.InteractiveTest
+
+// also known as SI-5013
+
+object Test extends InteractiveTest {
+
+ override def runDefaultTests(): Unit = {
+ val a = sourceFiles.find(_.file.name == "a.scala").head
+ val b = sourceFiles.find(_.file.name == "b.scala").head
+ askLoadedTyped(a).get
+ askLoadedTyped(b).get
+ super.runDefaultTests()
+ }
+
+}
diff --git a/test/files/presentation/ide-t1000567/src/a/a.scala b/test/files/presentation/ide-t1000567/src/a/a.scala
new file mode 100644
index 0000000000..ee21112a3e
--- /dev/null
+++ b/test/files/presentation/ide-t1000567/src/a/a.scala
@@ -0,0 +1,5 @@
+package a
+
+class Foo {
+ protected[Foo] var x = 0
+}
diff --git a/test/files/presentation/ide-t1000567/src/b/b.scala b/test/files/presentation/ide-t1000567/src/b/b.scala
new file mode 100644
index 0000000000..a0185b15cf
--- /dev/null
+++ b/test/files/presentation/ide-t1000567/src/b/b.scala
@@ -0,0 +1,5 @@
+package b
+
+class Bar extends a.Foo {
+ println(x)
+}
diff --git a/test/files/presentation/memory-leaks/MemoryLeaksTest.scala b/test/files/presentation/memory-leaks/MemoryLeaksTest.scala
index 159097cc10..950569c880 100644
--- a/test/files/presentation/memory-leaks/MemoryLeaksTest.scala
+++ b/test/files/presentation/memory-leaks/MemoryLeaksTest.scala
@@ -25,7 +25,7 @@ import scala.tools.nsc.doc
object Test extends InteractiveTest {
final val mega = 1024 * 1024
- override val settings: doc.Settings = docSettings
+ override val withDocComments = true
override def execute(): Unit = memoryConsumptionTest()