summaryrefslogtreecommitdiff
path: root/test/scaladoc/scalacheck/HtmlFactoryTest.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-03-14 08:44:12 +0100
committerFelix Mulder <felix.mulder@gmail.com>2016-03-14 10:45:31 +0100
commitc70292627c50adbbd5c4118a01a34bd7c23ba6b6 (patch)
tree8ee79961bf88179c340b3f18fdd374cea2887903 /test/scaladoc/scalacheck/HtmlFactoryTest.scala
parentac8c6e8f3a8f33d5987fc1fa320b3def5373a504 (diff)
downloadscala-c70292627c50adbbd5c4118a01a34bd7c23ba6b6.tar.gz
scala-c70292627c50adbbd5c4118a01a34bd7c23ba6b6.tar.bz2
scala-c70292627c50adbbd5c4118a01a34bd7c23ba6b6.zip
Remove unused classes from Scaladoc
Several elements of the old Scaladoc are not in use anymore. To help with any reverting, the removal of these is done in a single commit (this one). The removal includes: - Old `Index`, the old top "index.html" - The letter index (with "_" and "deprecated") - The old `Template` which is superceded by `Entity`
Diffstat (limited to 'test/scaladoc/scalacheck/HtmlFactoryTest.scala')
-rw-r--r--test/scaladoc/scalacheck/HtmlFactoryTest.scala45
1 files changed, 1 insertions, 44 deletions
diff --git a/test/scaladoc/scalacheck/HtmlFactoryTest.scala b/test/scaladoc/scalacheck/HtmlFactoryTest.scala
index a7da1e29a7..ab2c058a03 100644
--- a/test/scaladoc/scalacheck/HtmlFactoryTest.scala
+++ b/test/scaladoc/scalacheck/HtmlFactoryTest.scala
@@ -26,12 +26,9 @@ object Test extends Properties("HtmlFactory") {
final val RESOURCES = "test/scaladoc/resources/"
-
import scala.tools.nsc.ScalaDocReporter
import scala.tools.nsc.doc.{DocFactory, Settings}
- import scala.tools.nsc.doc.model.IndexModelFactory
import scala.tools.nsc.doc.html.HtmlFactory
- import scala.tools.nsc.doc.html.page.ReferenceIndex
def getClasspath = {
// these things can be tricky
@@ -60,8 +57,7 @@ object Test extends Properties("HtmlFactory") {
createFactory.makeUniverse(Left(List(RESOURCES+basename))) match {
case Some(universe) => {
- val index = IndexModelFactory.makeIndex(universe)
- (new HtmlFactory(universe, index, new ScalaDocReporter(universe.settings))).writeTemplates((page) => {
+ new HtmlFactory(universe, new ScalaDocReporter(universe.settings)).writeTemplates((page) => {
result += (page.absoluteLinkTo(page.path) -> page.body)
})
}
@@ -71,24 +67,6 @@ object Test extends Properties("HtmlFactory") {
result
}
- def createReferenceIndex(basename: String) = {
- createFactory.makeUniverse(Left(List(RESOURCES+basename))) match {
- case Some(universe) => {
- val index = IndexModelFactory.makeIndex(universe)
- val pages = index.firstLetterIndex.map({
- case (key, value) => {
- val reporter = new ScalaDocReporter(universe.settings)
- val page = new ReferenceIndex(key, index, universe, reporter)
- page.absoluteLinkTo(page.path) -> page.body
- }
- })
- Some(pages)
- }
- case _ =>
- None
- }
- }
-
def createTemplate(scala: String) = {
val html = scala.stripSuffix(".scala") + ".html"
createTemplates(scala)(html)
@@ -339,27 +317,6 @@ object Test extends Properties("HtmlFactory") {
}
}
- property("Trac #4471") = {
- createReferenceIndex("Trac4471.scala") match {
- case Some(pages) =>
- (pages.get("index/index-f.html") match {
- case Some(node) => node.toString.contains(">A</a></strike>")
- case _ => false
- }) && (pages.get("index/index-b.html") match {
- case Some(node) => node.toString.contains(">bar</strike>")
- case _ => false
- })
- case _ => false
- }
- }
-
- property("SI-4641") = {
- createReferenceIndex("SI_4641.scala") match {
- case Some(pages) => pages.contains("index/index-_.html")
- case _ => false
- }
- }
-
property("SI-4421") = {
createTemplate("SI_4421.scala") match {
case node: scala.xml.Node => {