From 6e6423be2070263129376472e7b6a48b32fac2af Mon Sep 17 00:00:00 2001 From: Eugene Vigdorchik Date: Wed, 26 Sep 2012 12:04:49 +0400 Subject: Generate links to external projects in scaladoc. Review by @VladUreche. --- test/scaladoc/resources/links.scala | 37 +++++++++++++++++++++---------------- test/scaladoc/run/links.scala | 4 ++-- 2 files changed, 23 insertions(+), 18 deletions(-) (limited to 'test/scaladoc') diff --git a/test/scaladoc/resources/links.scala b/test/scaladoc/resources/links.scala index 679d0b0dce..09a52a4334 100644 --- a/test/scaladoc/resources/links.scala +++ b/test/scaladoc/resources/links.scala @@ -34,24 +34,29 @@ package scala.test.scaladoc.links { /** * Links to the trait: - * - [[scala.test.scaladoc.links.Target!.T trait Target -> type T]] - * - [[test.scaladoc.links.Target!.S trait Target -> type S]] - * - [[scaladoc.links.Target!.foo(Int)* trait Target -> def foo]] - * - [[links.Target!.bar trait Target -> def bar]] - * - [[[[Target!.foo[A[_[_]]]* trait Target -> def foo with 3 nested tparams]]]] (should exercise nested parens) - * - [[Target$.T object Target -> type T]] - * - [[Target$.S object Target -> type S]] - * - [[Target$.foo(Str* object Target -> def foo]] - * - [[Target$.bar object Target -> def bar]] - * - [[[[Target$.foo[A[_[_]]]* trait Target -> def foo with 3 nested tparams]]]] (should exercise nested parens) - * - [[Target.onlyInObject object Target -> def foo]] (should find the object) - * - [[Target$.C object Target -> class C]] (should link directly to C, not as a member) - * - [[Target!.C trait Target -> class C]] (should link directly to C, not as a member) - * - [[Target$.baz(links\.C)* object Target -> def baz]] (should use dots in prefix) - * - [[Target!.baz(links\.C)* trait Target -> def baz]] (should use dots in prefix) - * - [[localMethod object TEST -> localMethod]] (should use the current template to resolve link instead of inTpl, that's the package) + * - [[scala.test.scaladoc.links.Target$ object Test]] + * - [[scala.test package scala.test]] + * - [[scala.test.scaladoc.links.Target!.T trait Target -> type T]] + * - [[test.scaladoc.links.Target!.S trait Target -> type S]] + * - [[scaladoc.links.Target!.foo(i:Int)* trait Target -> def foo]] + * - [[links.Target!.bar trait Target -> def bar]] + * - [[[[Target!.foo[A[_[_]]]* trait Target -> def foo with 3 nested tparams]]]] (should exercise nested parens) + * - [[Target$.T object Target -> type T]] + * - [[Target$.S object Target -> type S]] + * - [[Target$.foo(z:Str* object Target -> def foo]] + * - [[Target$.bar object Target -> def bar]] + * - [[[[Target$.foo[A[_[_]]]* trait Target -> def foo with 3 nested tparams]]]] (should exercise nested parens) + * - [[Target.onlyInObject object Target -> def foo]] (should find the object) + * - [[Target$.C object Target -> class C]] (should link directly to C, not as a member) + * - [[Target!.C trait Target -> class C]] (should link directly to C, not as a member) + * - [[Target$.baz(c:scala\.test\.scaladoc\.links\.C)* object Target -> def baz]] (should use dots in prefix) + * - [[Target!.baz(c:scala\.test\.scaladoc\.links\.C)* trait Target -> def baz]] (should use dots in prefix) + * - [[localMethod object TEST -> localMethod]] (should use the current template to resolve link instead of inTpl, that's the package) + * - [[#localMethod object TEST -> localMethod]] (should exercise Java-style links to empty members) + * - [[ImOutside class ImOutside (check correct lookup in EmptyPackage)]] */ object TEST { def localMethod = 3 } } +class ImOutside \ No newline at end of file diff --git a/test/scaladoc/run/links.scala b/test/scaladoc/run/links.scala index 40ce6368ce..de359539cf 100644 --- a/test/scaladoc/run/links.scala +++ b/test/scaladoc/run/links.scala @@ -22,7 +22,7 @@ object Test extends ScaladocModelTest { val memberLinks = countLinks(TEST.comment.get, _.link.isInstanceOf[LinkToMember]) val templateLinks = countLinks(TEST.comment.get, _.link.isInstanceOf[LinkToTpl]) - assert(memberLinks == 14, memberLinks + " == 14 (the member links in object TEST)") - assert(templateLinks == 2, templateLinks + " == 2 (the template links in object TEST)") + assert(memberLinks == 15, memberLinks + " == 15 (the member links in object TEST)") + assert(templateLinks == 5, templateLinks + " == 5 (the template links in object TEST)") } } \ No newline at end of file -- cgit v1.2.3