summaryrefslogtreecommitdiff
path: root/test/scaladoc
diff options
context:
space:
mode:
authorVlad Ureche <vlad.ureche@gmail.com>2012-10-09 20:42:20 +0200
committerVlad Ureche <vlad.ureche@gmail.com>2012-10-11 17:47:50 +0200
commit950687520907199e756680baed898c4d75cee1e8 (patch)
tree600957e28a1dda804f7536a682ee21dc096487b8 /test/scaladoc
parentc6df7ddd0657ace307eaf6d6bf436cbb24e93df4 (diff)
downloadscala-950687520907199e756680baed898c4d75cee1e8.tar.gz
scala-950687520907199e756680baed898c4d75cee1e8.tar.bz2
scala-950687520907199e756680baed898c4d75cee1e8.zip
SI-6495 Scaladoc will pick up group from owner
Diffstat (limited to 'test/scaladoc')
-rw-r--r--test/scaladoc/run/groups.scala94
1 files changed, 51 insertions, 43 deletions
diff --git a/test/scaladoc/run/groups.scala b/test/scaladoc/run/groups.scala
index 05324c2ec9..c9e4a8679b 100644
--- a/test/scaladoc/run/groups.scala
+++ b/test/scaladoc/run/groups.scala
@@ -4,49 +4,54 @@ import scala.tools.partest.ScaladocModelTest
object Test extends ScaladocModelTest {
override def code = """
- package test.scaladoc.groups {
-
- /**
- * The trait A
- * @groupdesc A Group A is the group that contains functions starting with f
- * For example:
- * {{{
- * this is an example
- * }}}
- * @groupdesc B Group B is the group that contains functions starting with b
- * @groupname B Group B has a nice new name and a high priority
- * @groupprio B -10
- * @group Traits
- * @note This is a note
- */
- trait A {
- /** foo description
- * @group A */
- def foo = 1
-
- /** bar description
- * @group B */
- def bar = 2
- }
-
- /** The trait B
- * @group Traits
- * @groupdesc C Group C is introduced by B
- */
- trait B {
- /** baz descriptopn
- * @group C */
- def baz = 3
- }
-
- /** The class C which inherits from both A and B
- * @group Classes
- * @groupdesc B Look ma, I'm overriding group descriptions!!!
- * @groupname B And names
- */
- class C extends A with B {
- /** Oh noes, I lost my group -- or did I?!? */
- override def baz = 4
+ package test.scaladoc {
+
+ /** @groupname Z From owner chain */
+ package object `groups`
+
+ package groups {
+ /**
+ * The trait A
+ * @groupdesc A Group A is the group that contains functions starting with f
+ * For example:
+ * {{{
+ * this is an example
+ * }}}
+ * @groupdesc B Group B is the group that contains functions starting with b
+ * @groupname B Group B has a nice new name and a high priority
+ * @groupprio B -10
+ * @group Traits
+ * @note This is a note
+ */
+ trait A {
+ /** foo description
+ * @group A */
+ def foo = 1
+
+ /** bar description
+ * @group B */
+ def bar = 2
+ }
+
+ /** The trait B
+ * @group Traits
+ * @groupdesc C Group C is introduced by B
+ */
+ trait B {
+ /** baz descriptopn
+ * @group C */
+ def baz = 3
+ }
+
+ /** The class C which inherits from both A and B
+ * @group Classes
+ * @groupdesc B Look ma, I'm overriding group descriptions!!!
+ * @groupname B And names
+ */
+ class C extends A with B {
+ /** Oh noes, I lost my group -- or did I?!? */
+ override def baz = 4
+ }
}
}
"""
@@ -101,10 +106,12 @@ object Test extends ScaladocModelTest {
checkGroupDesc(A, "B", "Group B is the group that contains functions starting with b")
checkGroupName(A, "B", "Group B has a nice new name and a high priority")
checkGroupPrio(A, "B", -10)
+ checkGroupName(A, "Z", "From owner chain")
checkGroupDesc(B, "C", "Group C is introduced by B")
checkGroupName(B, "C", "C")
checkGroupPrio(B, "C", 0)
+ checkGroupName(B, "Z", "From owner chain")
checkGroupDesc(C, "A", "Group A is the group that contains functions starting with f")
checkGroupName(C, "A", "A")
@@ -115,5 +122,6 @@ object Test extends ScaladocModelTest {
checkGroupDesc(C, "C", "Group C is introduced by B")
checkGroupName(C, "C", "C")
checkGroupPrio(C, "C", 0)
+ checkGroupName(C, "Z", "From owner chain")
}
} \ No newline at end of file