diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-04-11 09:23:04 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-04-11 09:23:04 +0200 |
commit | dfcb26ec6806d361334f12cb31e574ef57b2f7c5 (patch) | |
tree | a8c1c4973fe3bec4b1cb5ae057e034695e97bc12 /test | |
parent | fcf0efe1d70bd71b212f07a5764196860a7c4148 (diff) | |
download | dotty-dfcb26ec6806d361334f12cb31e574ef57b2f7c5.tar.gz dotty-dfcb26ec6806d361334f12cb31e574ef57b2f7c5.tar.bz2 dotty-dfcb26ec6806d361334f12cb31e574ef57b2f7c5.zip |
Fix issues with `enterBlock` for comment parsing
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 */ |