summaryrefslogtreecommitdiff
path: root/test/scaladoc/scalacheck
diff options
context:
space:
mode:
authorVlad Ureche <vlad.ureche@gmail.com>2012-06-16 04:23:43 +0200
committerVlad Ureche <vlad.ureche@gmail.com>2012-07-16 23:41:43 +0200
commitf916434c119289773e5aad88c633c30f68a12e14 (patch)
tree12f8c6a52d480454d4cefb0d7a10975b39c3d3c5 /test/scaladoc/scalacheck
parentfcbdc1725c6fcd65a071709408ef75097f487cb7 (diff)
downloadscala-f916434c119289773e5aad88c633c30f68a12e14.tar.gz
scala-f916434c119289773e5aad88c633c30f68a12e14.tar.bz2
scala-f916434c119289773e5aad88c633c30f68a12e14.zip
SI-3314 SI-4888 Scaladoc: Relative type prefixes
And adds support for linking to class members, only usable from the model factory now, so no links to members from the doc comment yet, sorry. But it fixes the Enumeration problem once and for all! Also corrected the inTpl for members obtained by implicit conversions, so they're in the correct template and the comment variable expansion is done from the correct (but different) template. Review by @kzys.
Diffstat (limited to 'test/scaladoc/scalacheck')
-rw-r--r--test/scaladoc/scalacheck/HtmlFactoryTest.scala73
1 files changed, 20 insertions, 53 deletions
diff --git a/test/scaladoc/scalacheck/HtmlFactoryTest.scala b/test/scaladoc/scalacheck/HtmlFactoryTest.scala
index 5b6f75426e..13eacf79a5 100644
--- a/test/scaladoc/scalacheck/HtmlFactoryTest.scala
+++ b/test/scaladoc/scalacheck/HtmlFactoryTest.scala
@@ -235,30 +235,6 @@ object Test extends Properties("HtmlFactory") {
}
}
- property("Trac #3484") = {
- val files = createTemplates("Trac3484.scala")
-
- files("Collection.html") match {
- case node: scala.xml.Node => {
- val s = node.toString
- s.contains("""<span class="result">: Traversable[B]</span>""")
- }
- case _ => false
- }
- }
-
- property("Trac #3484 - SR704") = {
- val files = createTemplates("Trac3484.scala")
-
- files("SR704.html") match {
- case node: scala.xml.Node => {
- val s = node.toString
- s.contains("Hello Mister John.")
- }
- case _ => false
- }
- }
-
property("Trac #4325 - files") = {
val files = createTemplates("Trac4325.scala")
@@ -303,7 +279,7 @@ object Test extends Properties("HtmlFactory") {
case _ => false
}
}
- //
+ //
// property("Trac #484 - refinements and existentials") = {
// val files = createTemplates("Trac484.scala")
// val lines = """
@@ -315,7 +291,7 @@ object Test extends Properties("HtmlFactory") {
// |def j(x: Int): Bar
// |def k(): AnyRef { type Dingus <: T forSome { type T <: String } }
// """.stripMargin.trim.lines map (_.trim)
- //
+ //
// files("RefinementAndExistentials.html") match {
// case node: scala.xml.Node => {
// val s = node.text.replaceAll("\\s+", " ")
@@ -397,26 +373,17 @@ object Test extends Properties("HtmlFactory") {
}
}
- property("Should decode symbolic type alias name.") = {
+ property("SI-4714: Should decode symbolic type alias name.") = {
createTemplate("SI_4715.scala") match {
case node: scala.xml.Node => {
val html = node.toString
- html.contains(">: :+:[<")
- }
- case _ => false
- }
- }
-
- property("Shouldn't drop type arguments to aliased tuple.") = {
- createTemplate("SI_4676.scala") match {
- case node: scala.xml.Node => {
- node.toString.contains(">ss: (String, String)<")
+ html.contains(">:+:<")
}
case _ => false
}
}
- property("Default arguments of synthesized constructor") = {
+ property("SI-4287: Default arguments of synthesized constructor") = {
val files = createTemplates("SI_4287.scala")
files("ClassWithSugar.html") match {
@@ -427,7 +394,7 @@ object Test extends Properties("HtmlFactory") {
}
}
- property("Default arguments of synthesized constructor") = {
+ property("SI-4507: Default arguments of synthesized constructor") = {
createTemplate("SI_4507.scala") match {
case node: scala.xml.Node =>
! node.toString.contains("<li>returns silently when evaluating true and true</li>")
@@ -435,40 +402,40 @@ object Test extends Properties("HtmlFactory") {
}
}
- property("Use cases and links should not crash scaladoc") = {
+ property("SI-4898: Use cases and links should not crash scaladoc") = {
createTemplate("SI_4898.scala")
true
}
- property("Use cases should override their original members") =
+ property("SI-5054: Use cases should override their original members") =
checkText("SI_5054_q1.scala")(
(None,"""def test(): Int""", true)
//Disabled because the full signature is now displayed
//(None,"""def test(implicit lost: Int): Int""", false)
)
- property("Use cases should keep their flags - final should not be lost") =
+ property("SI-5054: Use cases should keep their flags - final should not be lost") =
checkText("SI_5054_q2.scala")((None, """final def test(): Int""", true))
- property("Use cases should keep their flags - implicit should not be lost") =
+ property("SI-5054: Use cases should keep their flags - implicit should not be lost") =
checkText("SI_5054_q3.scala")((None, """implicit def test(): Int""", true))
- property("Use cases should keep their flags - real abstract should not be lost") =
+ property("SI-5054: Use cases should keep their flags - real abstract should not be lost") =
checkText("SI_5054_q4.scala")((None, """abstract def test(): Int""", true))
- property("Use cases should keep their flags - traits should not be affected") =
+ property("SI-5054: Use cases should keep their flags - traits should not be affected") =
checkText("SI_5054_q5.scala")((None, """def test(): Int""", true))
- property("Use cases should keep their flags - traits should not be affected") =
+ property("SI-5054: Use cases should keep their flags - traits should not be affected") =
checkText("SI_5054_q6.scala")((None, """abstract def test(): Int""", true))
- property("Use case individual signature test") =
+ property("SI-5054: Use case individual signature test") =
checkText("SI_5054_q7.scala")(
(None, """abstract def test2(explicit: Int): Int [use case] This takes the explicit value passed.""", true),
(None, """abstract def test1(): Int [use case] This takes the implicit value in scope.""", true)
)
- property("Display correct \"Definition classes\"") =
+ property("SI-5287: Display correct \"Definition classes\"") =
checkText("SI_5287.scala")(
(None,
"""def method(): Int
@@ -477,7 +444,7 @@ object Test extends Properties("HtmlFactory") {
Definition Classes SI_5287 SI_5287_B SI_5287_A""", true)
) // the explanation appears twice, as small comment and full comment
- property("Correct comment inheritance for overriding") =
+ property("Comment inheritance: Correct comment inheritance for overriding") =
checkText("implicit-inheritance-override.scala")(
(Some("Base"),
"""def function[T](arg1: T, arg2: String): Double
@@ -521,7 +488,7 @@ object Test extends Properties("HtmlFactory") {
)
for (useCaseFile <- List("UseCaseInheritance", "UseCaseOverrideInheritance")) {
- property("Correct comment inheritance for usecases") =
+ property("Comment inheritance: Correct comment inheritance for usecases") =
checkText("implicit-inheritance-usecase.scala")(
(Some(useCaseFile),
"""def missing_arg[T](arg1: T): Double
@@ -588,7 +555,7 @@ object Test extends Properties("HtmlFactory") {
)
}
- property("Correct explicit inheritance for override") =
+ property("Comment inheritance: Correct explicit inheritance for override") =
checkText("explicit-inheritance-override.scala")(
(Some("InheritDocDerived"),
"""def function[T](arg1: T, arg2: String): Double
@@ -614,7 +581,7 @@ object Test extends Properties("HtmlFactory") {
See also StartSee The Manual EndSee
""", true))
- property("Correct explicit inheritance for usecase") =
+ property("Comment inheritance: Correct explicit inheritance for usecase") =
checkText("explicit-inheritance-usecase.scala")(
(Some("UseCaseInheritDoc"),
"""def function[T](arg1: T, arg2: String): Double
@@ -639,7 +606,7 @@ object Test extends Properties("HtmlFactory") {
See also StartSee The Manual EndSee
""", true))
- property("Correct explicit inheritance in corner cases") =
+ property("Comment inheritance: Correct explicit inheritance in corner cases") =
checkText("inheritdoc-corner-cases.scala")(
(Some("D"),
"""def hello1: Int