From 23918873cbe055f22d40fa4c96651fd93186e687 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Mon, 9 Sep 2013 10:33:42 +0200 Subject: SI-7767 Test case for Scaladoc on early initializers --- test/scaladoc/run/t7767.check | 1 + test/scaladoc/run/t7767.scala | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 test/scaladoc/run/t7767.check create mode 100644 test/scaladoc/run/t7767.scala (limited to 'test/scaladoc') diff --git a/test/scaladoc/run/t7767.check b/test/scaladoc/run/t7767.check new file mode 100644 index 0000000000..619c56180b --- /dev/null +++ b/test/scaladoc/run/t7767.check @@ -0,0 +1 @@ +Done. diff --git a/test/scaladoc/run/t7767.scala b/test/scaladoc/run/t7767.scala new file mode 100644 index 0000000000..be5e9fe080 --- /dev/null +++ b/test/scaladoc/run/t7767.scala @@ -0,0 +1,20 @@ +import scala.tools.nsc.doc.model._ +import scala.tools.partest.ScaladocModelTest + +object Test extends ScaladocModelTest { + + // This caused an infinite recursion in method inline() in CommentFactory.scala + override def code = """ + class Docable extends { /**Doc*/ val foo = 0 } with AnyRef + """ + + // no need for special settings + def scaladocSettings = "" + + def testModel(rootPackage: Package) = { + import access._ + // if it doesn't hang, the test is passed + val comment = rootPackage._class("Docable")._value("foo").comment.map(_.body.toString.trim).getOrElse("") + assert(comment.contains("Doc"), comment) + } +} -- cgit v1.2.3