summaryrefslogtreecommitdiff
path: root/test/scaladoc
diff options
context:
space:
mode:
authorKato Kazuyoshi <kato.kazuyoshi@gmail.com>2011-03-31 12:59:56 +0000
committerKato Kazuyoshi <kato.kazuyoshi@gmail.com>2011-03-31 12:59:56 +0000
commitdaa3b19439e5c40b4c16a36fcdbabf58431f2f2e (patch)
tree8fc28009a8a0f12fbc9a47393371270472a922ab /test/scaladoc
parente94a62622d9121bc55e0a4f16df68b5b94625570 (diff)
downloadscala-daa3b19439e5c40b4c16a36fcdbabf58431f2f2e.tar.gz
scala-daa3b19439e5c40b4c16a36fcdbabf58431f2f2e.tar.bz2
scala-daa3b19439e5c40b4c16a36fcdbabf58431f2f2e.zip
[scaladoc] Don't link to syntetic companion.
Diffstat (limited to 'test/scaladoc')
-rw-r--r--test/scaladoc/resources/Trac4325.scala5
-rw-r--r--test/scaladoc/scala/html/HtmlFactoryTest.scala33
2 files changed, 38 insertions, 0 deletions
diff --git a/test/scaladoc/resources/Trac4325.scala b/test/scaladoc/resources/Trac4325.scala
new file mode 100644
index 0000000000..ffb968d571
--- /dev/null
+++ b/test/scaladoc/resources/Trac4325.scala
@@ -0,0 +1,5 @@
+case class WithSynthetic
+
+case class WithObject
+object WithObject
+
diff --git a/test/scaladoc/scala/html/HtmlFactoryTest.scala b/test/scaladoc/scala/html/HtmlFactoryTest.scala
index 46267bff3f..0c9f7ff48d 100644
--- a/test/scaladoc/scala/html/HtmlFactoryTest.scala
+++ b/test/scaladoc/scala/html/HtmlFactoryTest.scala
@@ -178,4 +178,37 @@ object Test extends Properties("HtmlFactory") {
case _ => false
}
}
+
+ property("Trac #4325 - files") = {
+ val files = createTemplates("Trac4325.scala")
+
+ files.get("WithSynthetic.html") != None &&
+ files.get("WithSynthetic$.html") == None &&
+ files.get("WithObject.html") != None &&
+ files.get("WithObject$.html") != None
+ }
+
+ property("Trac #4325 - Don't link to syntetic companion") = {
+ val files = createTemplates("Trac4325.scala")
+
+ files("WithSynthetic.html") match {
+ case node: scala.xml.Node => {
+ val s = node.toString
+ ! s.contains("""go to: <a href="WithSynthetic$.html">companion</a>""")
+ }
+ case _ => false
+ }
+ }
+
+ property("Trac #4325 - Link to companion") = {
+ val files = createTemplates("Trac4325.scala")
+
+ files("WithObject.html") match {
+ case node: scala.xml.Node => {
+ val s = node.toString
+ s.contains("""go to: <a href="WithObject$.html">companion</a>""")
+ }
+ case _ => false
+ }
+ }
}