diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test/DottyDocParsingTests.scala | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/test/DottyDocParsingTests.scala b/test/test/DottyDocParsingTests.scala index 32cfaaddf..b09d048da 100644 --- a/test/test/DottyDocParsingTests.scala +++ b/test/test/DottyDocParsingTests.scala @@ -456,4 +456,34 @@ class DottyDocParsingTests extends DottyDocTest { } } } + + @Test def withExtends = { + val source = + """ + |trait Trait1 + |/** Class1 */ + |class Class1 extends Trait1 + """.stripMargin + + import dotty.tools.dotc.ast.untpd._ + checkFrontend(source) { + case p @ PackageDef(_, Seq(_, c: TypeDef)) => + checkDocString(c.rawComment, "/** Class1 */") + } + } + + @Test def withAnnotation = { + val source = + """ + |/** Class1 */ + |@SerialVersionUID(1) + |class Class1 + """.stripMargin + + import dotty.tools.dotc.ast.untpd._ + checkFrontend(source) { + case p @ PackageDef(_, Seq(c: TypeDef)) => + checkDocString(c.rawComment, "/** Class1 */") + } + } } /* End class */ |