diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/scaladoc/resources/Trac3484.scala | 27 | ||||
-rw-r--r-- | test/scaladoc/scala/html/HtmlFactoryTest.scala | 24 |
2 files changed, 51 insertions, 0 deletions
diff --git a/test/scaladoc/resources/Trac3484.scala b/test/scaladoc/resources/Trac3484.scala new file mode 100644 index 0000000000..9656ec268d --- /dev/null +++ b/test/scaladoc/resources/Trac3484.scala @@ -0,0 +1,27 @@ +class cbf[A, B, C] + +/** + * @define Coll Traversable + * @define bfreturn $Coll + */ +class Collection[A] { + /** What map does... + * + * $bfreturn + * @usecase def map[B](f: A => B): $bfreturn[B] + * + */ + def map[B, That](f: A => B)(implicit fact: cbf[Collection[A], B, That]) = + null +} + +/** + * @define b John + * @define a Mister $b + */ +class SR704 { + /** + * Hello $a. + */ + def foo = 123 +} diff --git a/test/scaladoc/scala/html/HtmlFactoryTest.scala b/test/scaladoc/scala/html/HtmlFactoryTest.scala index ab76cbc7fc..46267bff3f 100644 --- a/test/scaladoc/scala/html/HtmlFactoryTest.scala +++ b/test/scaladoc/scala/html/HtmlFactoryTest.scala @@ -154,4 +154,28 @@ object Test extends Properties("HtmlFactory") { case _ => false } } + + 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 + } + } } |