Merge "Add support for Kotlin input in dac tests." am: ee8dbe40b0 am: 9234642d28 am: 0c26b1e903

Change-Id: I51eaf4c022d0cbfe8484f7492b21b614e40645a9
diff --git a/core/src/test/kotlin/format/DacFormatTestCase.kt b/core/src/test/kotlin/format/DacFormatTestCase.kt
index f3998c5..922b580 100644
--- a/core/src/test/kotlin/format/DacFormatTestCase.kt
+++ b/core/src/test/kotlin/format/DacFormatTestCase.kt
@@ -12,6 +12,7 @@
 import org.jetbrains.dokka.Utilities.bind
 import org.jetbrains.dokka.tests.assertEqualsIgnoringSeparators
 import org.jetbrains.dokka.tests.verifyModel
+import org.jetbrains.kotlin.cli.common.config.KotlinSourceRoot
 import org.jetbrains.kotlin.cli.jvm.config.JavaSourceRoot
 import org.junit.Rule
 import org.junit.rules.TemporaryFolder
@@ -68,7 +69,7 @@
 
         val directoryFile = File("testdata/format/dac/$directory")
         verifyModel(
-            JavaSourceRoot(directoryFile, null),
+            JavaSourceRoot(directoryFile, null), KotlinSourceRoot(directoryFile.path, false),
             format = dokkaFormat
         ) { documentationModule ->
             val nodes = documentationModule.members.single().members
diff --git a/core/testdata/format/dac/javaSeeTag/Bar.kt b/core/testdata/format/dac/javaSeeTag/Bar.kt
new file mode 100644
index 0000000..9df6711
--- /dev/null
+++ b/core/testdata/format/dac/javaSeeTag/Bar.kt
@@ -0,0 +1,4 @@
+/**
+ * @see Foo
+ */
+class Bar
\ No newline at end of file
diff --git a/core/testdata/format/dac/javaSeeTag/dac-as-java/Bar.html b/core/testdata/format/dac/javaSeeTag/dac-as-java/Bar.html
new file mode 100644
index 0000000..3dbc813
--- /dev/null
+++ b/core/testdata/format/dac/javaSeeTag/dac-as-java/Bar.html
@@ -0,0 +1,49 @@
+<html devsite="true">
+  <head>
+    <title>Bar</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "_shared/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="api-info-block"></div>
+    <h1>Bar</h1>
+    <pre><span class="keyword">public</span> <span class="keyword">final</span> <span class="keyword">class</span> <span class="identifier">Bar</span> <span class="keyword">implements</span> <span class="identifier">java.lang.Object</span></pre>
+    <table class="jd-inheritance-table">
+      <tr>
+        <td class="jd-inheritance-class-cell" colSpan="1"><a href="#">Bar</a></td>
+      </tr>
+    </table>
+    <h2>Summary</h2>
+    <table class="responsive" id="pubctors">
+      <tbody>
+        <tr>
+          <th colSpan="2">
+            <devsite-heading ds-is="heading" text="Public constructors" id="pubctors" level="h3" toc="" class="">
+              <h3 is-upgraded="">Public constructors</h3>
+            </devsite-heading>
+          </th>
+        </tr>
+        <tr>
+          <td>
+            <div><code><a href="#Bar()">Bar</a>()</code></div>
+            <p></p>
+          </td>
+        </tr>
+      </tbody>
+    </table>
+    <h2>Public constructors</h2>
+<a name="Bar()"></a>
+    <div class="api apilevel-" data-version-added="">
+      <h3 class="api-name">Bar</h3>
+      <pre class="api-signature no-pretty-print"><span class="keyword">public</span> <span class="identifier">Bar</span><span class="symbol">(</span><span class="symbol">)</span></pre>
+      <div>
+        <p><b>See Also</b></p>
+        <ul class="nolist">
+          <li><code>
+              <p><a href="Foo.html#">Foo</a></p>
+            </code></li>
+        </ul>
+      </div>
+    </div>
+  </body>
+</html>
diff --git a/core/testdata/format/dac/javaSeeTag/dac/Bar.html b/core/testdata/format/dac/javaSeeTag/dac/Bar.html
new file mode 100644
index 0000000..b7d8304
--- /dev/null
+++ b/core/testdata/format/dac/javaSeeTag/dac/Bar.html
@@ -0,0 +1,49 @@
+<html devsite="true">
+  <head>
+    <title>Bar</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "_shared/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="api-info-block"></div>
+    <h1>Bar</h1>
+    <pre><span class="keyword">class </span><span class="identifier">Bar</span></pre>
+    <table class="jd-inheritance-table">
+      <tr>
+        <td class="jd-inheritance-class-cell" colSpan="1"><a href="#">Bar</a></td>
+      </tr>
+    </table>
+    <h2>Summary</h2>
+    <table class="responsive" id="pubctors">
+      <tbody>
+        <tr>
+          <th colSpan="2">
+            <devsite-heading ds-is="heading" text="Public constructors" id="pubctors" level="h3" toc="" class="">
+              <h3 is-upgraded="">Public constructors</h3>
+            </devsite-heading>
+          </th>
+        </tr>
+        <tr>
+          <td>
+            <div><code><a href="#%3Cinit%3E()">&lt;init&gt;</a>()</code></div>
+            <p></p>
+          </td>
+        </tr>
+      </tbody>
+    </table>
+    <h2>Public constructors</h2>
+<a name="%3Cinit%3E()"></a>
+    <div class="api apilevel-" data-version-added="">
+      <h3 class="api-name">&lt;init&gt;</h3>
+      <pre class="api-signature no-pretty-print"><span class="identifier">Bar</span><span class="symbol">(</span><span class="symbol">)</span></pre>
+      <div>
+        <p><b>See Also</b></p>
+        <ul class="nolist">
+          <li><code>
+              <p><a href="Foo.html#">Foo</a></p>
+            </code></li>
+        </ul>
+      </div>
+    </div>
+  </body>
+</html>