summaryrefslogtreecommitdiff
path: root/test/scaladoc/run/diagrams-filtering.scala
diff options
context:
space:
mode:
authorVlad Ureche <vlad.ureche@gmail.com>2012-06-28 00:03:56 +0200
committerVlad Ureche <vlad.ureche@gmail.com>2012-07-02 13:34:15 +0200
commitf8cb1aee92fa19e38a1481a4e614cd866ef238c0 (patch)
tree00bfb3a2f355f4fa4923e3aa5390eaa4975f7187 /test/scaladoc/run/diagrams-filtering.scala
parentf8057d22235c77d69d72d6ea4d4ebdc2eeb95cdf (diff)
downloadscala-f8cb1aee92fa19e38a1481a4e614cd866ef238c0.tar.gz
scala-f8cb1aee92fa19e38a1481a4e614cd866ef238c0.tar.bz2
scala-f8cb1aee92fa19e38a1481a4e614cd866ef238c0.zip
Diagram tweaks #1
- relaxed the restrictions on nodes - nodes can be classes, traits and objects, both stand-alone and companion objects -- all are added to the diagram, but usually companion objects are filtered out as they don't have any superclasses - changed the rules for default diagram creation: - classes and traits (and AnyRef) get inheritance diagrams - packages and objects get content diagrams (can be overridden by @contentDiagram [hideDiagram] and @inheritanceDiagram [hideDiagram]) - tweaked the model to register subclasses of Any - hardcoded the scala package diagram to show all relations - enabled @contentDiagram showInheritedNodes by default and changed the setting to hideInheritedNodes (and added a test for this) - better node selection (can select nodes that don't have a corresponding trait) - fixed the docsite link in member selection, which was broken since the first commit :))
Diffstat (limited to 'test/scaladoc/run/diagrams-filtering.scala')
-rw-r--r--test/scaladoc/run/diagrams-filtering.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/scaladoc/run/diagrams-filtering.scala b/test/scaladoc/run/diagrams-filtering.scala
index dfde5cac52..8cb32180a1 100644
--- a/test/scaladoc/run/diagrams-filtering.scala
+++ b/test/scaladoc/run/diagrams-filtering.scala
@@ -54,11 +54,11 @@ object Test extends ScaladocModelTest {
assert(packDiag.edges.map(_._2.length).sum == 5)
// trait A
- // Assert we have just 2 nodes and 1 edge
+ // Assert we have just 3 nodes and 2 edges
val A = base._trait("A")
val ADiag = A.inheritanceDiagram.get
- assert(ADiag.nodes.length == 2)
- assert(ADiag.edges.map(_._2.length).sum == 1)
+ assert(ADiag.nodes.length == 3)
+ assert(ADiag.edges.map(_._2.length).sum == 2)
// trait C
val C = base._trait("C")
@@ -82,7 +82,7 @@ object Test extends ScaladocModelTest {
val (outgoingSuperclass, outgoingImplicit) = outgoing.head._2.partition(_.isNormalNode)
assert(outgoingSuperclass.length == 2) // B and C
- assert(outgoingImplicit.length == 1) // T
+ assert(outgoingImplicit.length == 1, outgoingImplicit) // T
val (incomingSubclass, incomingImplicit) = incoming.partition(_._1.isNormalNode)
assert(incomingSubclass.length == 2) // F and G