aboutsummaryrefslogtreecommitdiff
path: root/dottydoc/test/PackageStructure.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-11-03 16:20:28 +0100
committerGuillaume Martres <smarter@ubuntu.com>2016-11-22 01:35:07 +0100
commit94a8177f208418682b86934eb3f0b8edab99b1f0 (patch)
treeef2018006aee9af3f3afb9a92037ec605d835cd1 /dottydoc/test/PackageStructure.scala
parentfcdb1c984c4b32c0c1b13337d9bd50a3883cb3b3 (diff)
downloaddotty-94a8177f208418682b86934eb3f0b8edab99b1f0.tar.gz
dotty-94a8177f208418682b86934eb3f0b8edab99b1f0.tar.bz2
dotty-94a8177f208418682b86934eb3f0b8edab99b1f0.zip
Move `dottydoc` -> `doc-tool`
Diffstat (limited to 'dottydoc/test/PackageStructure.scala')
-rw-r--r--dottydoc/test/PackageStructure.scala90
1 files changed, 0 insertions, 90 deletions
diff --git a/dottydoc/test/PackageStructure.scala b/dottydoc/test/PackageStructure.scala
deleted file mode 100644
index 4e7006bfe..000000000
--- a/dottydoc/test/PackageStructure.scala
+++ /dev/null
@@ -1,90 +0,0 @@
-package dotty.tools
-package dottydoc
-
-import org.junit.Test
-import org.junit.Assert._
-
-import dotc.util.SourceFile
-import model.internal._
-
-class PackageStructure extends DottyTest {
- @Test def multipleCompilationUnits = {
- val source1 = new SourceFile(
- "TraitA.scala",
- """
- |package scala
- |
- |trait A
- """.stripMargin
- )
-
- val source2 = new SourceFile(
- "TraitB.scala",
- """
- |package scala
- |
- |trait B
- """.stripMargin
- )
-
- checkSources(source1 :: source2 :: Nil) { packages =>
- packages("scala") match {
- case PackageImpl(_, _, List(tA, tB), _, _) =>
- assert(
- tA.name == "A" && tB.name == "B",
- s"trait A had name '${tA.name}' and trait B had name '${tB.name}'"
- )
- case _ => fail("Incorrect package structure after run")
- }
- }
- }
-
-
- @Test def multiplePackages = {
- val source1 = new SourceFile(
- "TraitA.scala",
- """
- |package scala
- |package collection
- |
- |trait A
- """.stripMargin)
-
- val source2 = new SourceFile(
- "TraitB.scala",
- """
- |package scala
- |package collection
- |
- |trait B
- """.stripMargin)
-
- checkSources(source1 :: source2 :: Nil) { packages =>
- packages("scala") match {
- case PackageImpl(
- _,
- "scala",
- List(PackageImpl(_, "scala.collection", List(tA, tB), _, _)),
- _, _
- ) =>
- assert(
- tA.name == "A" && tB.name == "B",
- s"trait A had name '${tA.name}' and trait B had name '${tB.name}'"
- )
-
- case _ =>
- fail(s"""Incorrect package structure for 'scala' package: ${packages("scala")}""")
- }
-
- packages("scala.collection") match {
- case PackageImpl(_, "scala.collection", List(tA, tB), _, _) =>
- assert(
- tA.name == "A" && tB.name == "B",
- s"trait A had name '${tA.name}' and trait B had name '${tB.name}'"
- )
-
- case _ => fail("Incorrect package structure for 'scala.collection' package")
- }
- }
- }
-}