From fdd2d9a25661b0faba687a168855138dc8ee30fa Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 20 Feb 2015 18:02:00 +0100 Subject: links to supertypes in Java --- test/data/format/javaSupertype.html | 13 +++++++++++++ test/data/format/javaSupertype.java | 9 +++++++++ test/src/TestAPI.kt | 2 +- test/src/format/HtmlFormatTest.kt | 6 ++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 test/data/format/javaSupertype.html create mode 100644 test/data/format/javaSupertype.java (limited to 'test') diff --git a/test/data/format/javaSupertype.html b/test/data/format/javaSupertype.html new file mode 100644 index 00000000..bf56936c --- /dev/null +++ b/test/data/format/javaSupertype.html @@ -0,0 +1,13 @@ + + +test / test.C.Bar + + +test / test / C / Bar
+
+

Bar

+public open class Bar : Foo
+
+
+ + diff --git a/test/data/format/javaSupertype.java b/test/data/format/javaSupertype.java new file mode 100644 index 00000000..96caeb1d --- /dev/null +++ b/test/data/format/javaSupertype.java @@ -0,0 +1,9 @@ +package test; + +class C { + public static class Foo { + } + + public static class Bar extends Foo { + } +} diff --git a/test/src/TestAPI.kt b/test/src/TestAPI.kt index 33688053..7c6a2e73 100644 --- a/test/src/TestAPI.kt +++ b/test/src/TestAPI.kt @@ -48,7 +48,7 @@ public fun verifyOutput(path: String, outputExtension: String, outputGenerator: verifyModel(path) { val output = StringBuilder() outputGenerator(it, output) - val expectedOutput = File(path.replace(".kt", outputExtension)).readText() + val expectedOutput = File(path.replace(".kt", outputExtension).replace(".java", outputExtension)).readText() assertEqualsIgnoringSeparators(expectedOutput, output.toString()) } } diff --git a/test/src/format/HtmlFormatTest.kt b/test/src/format/HtmlFormatTest.kt index 9d4d30da..f6e0a2f3 100644 --- a/test/src/format/HtmlFormatTest.kt +++ b/test/src/format/HtmlFormatTest.kt @@ -93,4 +93,10 @@ public class HtmlFormatTest { htmlService.appendNodes(tempLocation, output, model.members.single().members) } } + + Test fun javaSupertypeLink() { + verifyOutput("test/data/format/javaSupertype.java", ".html") { model, output -> + htmlService.appendNodes(tempLocation, output, model.members.single().members.single { it.name == "C"}.members.filter { it.name == "Bar"} ) + } + } } -- cgit