summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVlad Ureche <vlad.ureche@gmail.com>2012-10-11 03:04:23 +0200
committerVlad Ureche <vlad.ureche@gmail.com>2012-10-11 17:47:58 +0200
commit2280b8e3d5472be2df69bb0531486c25cf10edc4 (patch)
tree4d5aad56ac05b0aa61625d95a7eb78beca91b48a /test
parente3a2d0bc4b1931aa311da0305d12ae7ec00d5e2d (diff)
downloadscala-2280b8e3d5472be2df69bb0531486c25cf10edc4.tar.gz
scala-2280b8e3d5472be2df69bb0531486c25cf10edc4.tar.bz2
scala-2280b8e3d5472be2df69bb0531486c25cf10edc4.zip
SI-6155 Scaladoc @template diagrms
Diffstat (limited to 'test')
-rw-r--r--test/scaladoc/resources/SI-6511.scala24
-rw-r--r--test/scaladoc/run/SI-6511.check1
-rw-r--r--test/scaladoc/run/SI-6511.scala22
3 files changed, 47 insertions, 0 deletions
diff --git a/test/scaladoc/resources/SI-6511.scala b/test/scaladoc/resources/SI-6511.scala
new file mode 100644
index 0000000000..1f153caeb0
--- /dev/null
+++ b/test/scaladoc/resources/SI-6511.scala
@@ -0,0 +1,24 @@
+package test.scaladoc.template.diagrams
+
+/** @contentDiagram hideNodes "*Api" */
+trait X {
+ /** @template */
+ type Symbol >: Null <: SymbolApi
+
+ /** @template */
+ type TypeSymbol >: Null <: Symbol with TypeSymbolApi
+
+ /** @template */
+ type TermSymbol >: Null <: Symbol with TermSymbolApi
+
+ /** @template */
+ type MethodSymbol >: Null <: TermSymbol with MethodSymbolApi
+
+ trait SymbolApi { this: Symbol => def x: Int}
+ trait TermSymbolApi extends SymbolApi { this: TermSymbol => def y: Int}
+ trait TypeSymbolApi extends SymbolApi { this: TypeSymbol => def z: Int}
+ trait MethodSymbolApi extends TermSymbolApi { this: MethodSymbol => def t: Int }
+}
+
+/** @contentDiagram hideNodes "*Api" */
+trait Y extends X
diff --git a/test/scaladoc/run/SI-6511.check b/test/scaladoc/run/SI-6511.check
new file mode 100644
index 0000000000..3925a0d464
--- /dev/null
+++ b/test/scaladoc/run/SI-6511.check
@@ -0,0 +1 @@
+Done. \ No newline at end of file
diff --git a/test/scaladoc/run/SI-6511.scala b/test/scaladoc/run/SI-6511.scala
new file mode 100644
index 0000000000..cc950a98d6
--- /dev/null
+++ b/test/scaladoc/run/SI-6511.scala
@@ -0,0 +1,22 @@
+import scala.tools.nsc.doc.model._
+import scala.tools.partest.ScaladocModelTest
+
+object Test extends ScaladocModelTest {
+
+ override def resourceFile: String = "SI-6511.scala"
+
+ // no need for special settings
+ def scaladocSettings = "-diagrams"
+
+ def testModel(rootPackage: Package) = {
+ // get the quick access implicit defs in scope (_package(s), _class(es), _trait(s), object(s) _method(s), _value(s))
+ import access._
+
+ val main = rootPackage._package("test")._package("scaladoc")._package("template")._package("diagrams")
+ val X = main._trait("X")
+ val Y = main._trait("Y")
+
+ testDiagram(X, X.contentDiagram, nodes = 4, edges = 3)
+ testDiagram(Y, Y.contentDiagram, nodes = 4, edges = 3)
+ }
+} \ No newline at end of file