diff options
Diffstat (limited to 'test/scaladoc')
-rw-r--r-- | test/scaladoc/resources/SI_4898.scala | 9 | ||||
-rw-r--r-- | test/scaladoc/resources/SI_5054.scala | 10 | ||||
-rw-r--r-- | test/scaladoc/scala/html/HtmlFactoryTest.scala | 15 |
3 files changed, 34 insertions, 0 deletions
diff --git a/test/scaladoc/resources/SI_4898.scala b/test/scaladoc/resources/SI_4898.scala new file mode 100644 index 0000000000..40461d15b5 --- /dev/null +++ b/test/scaladoc/resources/SI_4898.scala @@ -0,0 +1,9 @@ +class SI_4898 { + + /** + * A link to [[__root__ + * + * @usecase def test(): Int + */ + def test(implicit param: Int): Int = param +}
\ No newline at end of file diff --git a/test/scaladoc/resources/SI_5054.scala b/test/scaladoc/resources/SI_5054.scala new file mode 100644 index 0000000000..17167303e4 --- /dev/null +++ b/test/scaladoc/resources/SI_5054.scala @@ -0,0 +1,10 @@ +class SI_5054 { + + /** + * A simple comment + * + * @param lost a lost parameter + * @usecase def test(): Int + */ + def test(implicit lost: Int): Int = lost +}
\ No newline at end of file diff --git a/test/scaladoc/scala/html/HtmlFactoryTest.scala b/test/scaladoc/scala/html/HtmlFactoryTest.scala index 916fe2e42f..adad3b6053 100644 --- a/test/scaladoc/scala/html/HtmlFactoryTest.scala +++ b/test/scaladoc/scala/html/HtmlFactoryTest.scala @@ -373,6 +373,21 @@ object Test extends Properties("HtmlFactory") { } } + property("Use cases and links should not crash scaladoc") = { + createTemplate("SI_4898.scala") + true + } + + property("Use cases should override their original members - valid until signature is added to html") = { + createTemplate("SI_5054.scala") match { + case node: scala.xml.Node => + node.toString.contains("A simple comment") && + ! node.toString.contains("a lost parameter") + case _ => false + } + } + + { val files = createTemplates("basic.scala") println(files) |