summaryrefslogtreecommitdiff
path: root/test/scaladoc/scalacheck/IndexTest.scala
diff options
context:
space:
mode:
authorAntoine Gourlay <antoine@gourlay.fr>2015-04-16 17:24:12 +0200
committerAntoine Gourlay <antoine@gourlay.fr>2015-04-22 16:01:51 +0200
commita3e93d95215b96740306d10a17a858f407ca39e5 (patch)
treee3653a59acef67d1c9e05ca7b0e77bff984c0426 /test/scaladoc/scalacheck/IndexTest.scala
parentd2a174d27bce392329a9c5e4c7d2acee263cdb34 (diff)
downloadscala-a3e93d95215b96740306d10a17a858f407ca39e5.tar.gz
scala-a3e93d95215b96740306d10a17a858f407ca39e5.tar.bz2
scala-a3e93d95215b96740306d10a17a858f407ca39e5.zip
SI-4476 add an index of deprecated members to scaladoc
The deprecated list is only emitted if there actually are deprecated members; same for the link in the left sidebar. We just build on the existing index support, with an additional method to avoid having to go through the whole index if we won't generate the page anyway. The deprecated list page itself is completely identical to the normal index pages, except we don't strike through any entry (there are *all* deprecated already). There is just about enough space in the left sidebar for the deprecated link, see [1], and [2] for when there are no deprecated members. [1]: http://static.gourlaysama.net/img/scaladoc-deprecated.png [2]: http://static.gourlaysama.net/img/scaladoc-deprecated-empty.png
Diffstat (limited to 'test/scaladoc/scalacheck/IndexTest.scala')
-rw-r--r--test/scaladoc/scalacheck/IndexTest.scala8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/scaladoc/scalacheck/IndexTest.scala b/test/scaladoc/scalacheck/IndexTest.scala
index abc0e5da01..7dbd2103a6 100644
--- a/test/scaladoc/scalacheck/IndexTest.scala
+++ b/test/scaladoc/scalacheck/IndexTest.scala
@@ -71,7 +71,7 @@ object Test extends Properties("Index") {
case None => false
}
}
- property("browser contants a script element") = {
+ property("browser contains a script element") = {
createIndex("src/scaladoc/scala/tools/nsc/doc/html/page/Index.scala") match {
case Some(index) =>
(index.browser \ "script").size == 1
@@ -86,4 +86,10 @@ object Test extends Properties("Index") {
case None => false
}
}
+ property("index should report if there are deprecated members") = {
+ createIndex("test/scaladoc/resources/SI-4476.scala") match {
+ case Some(indexPage) => indexPage.index.hasDeprecatedMembers
+ case None => false
+ }
+ }
}