diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/java/deprecation.java | 5 | ||||
-rw-r--r-- | test/src/model/JavaTest.kt | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/test/data/java/deprecation.java b/test/data/java/deprecation.java new file mode 100644 index 00000000..07cbd901 --- /dev/null +++ b/test/data/java/deprecation.java @@ -0,0 +1,5 @@ +package test; + +class C { + @Deprecated("This should no longer be used") void fn() {} +}
\ No newline at end of file diff --git a/test/src/model/JavaTest.kt b/test/src/model/JavaTest.kt index cdb0ba44..c727277a 100644 --- a/test/src/model/JavaTest.kt +++ b/test/src/model/JavaTest.kt @@ -161,6 +161,23 @@ public class JavaTest { } } + Test fun deprecation() { + verifyPackageMember("test/data/java/deprecation.java") { cls -> + val fn = cls.members(DocumentationNode.Kind.Function).single() + with(fn.deprecation!!) { + assertEquals(1, details.count()) + with(details[0]) { + assertEquals(DocumentationNode.Kind.Parameter, kind) + assertEquals(1, details.count()) + with(details[0]) { + assertEquals(DocumentationNode.Kind.Value, kind) + assertEquals("This should no longer be used", name) + } + } + } + } + } + Test fun javaLangObject() { verifyPackageMember("test/data/java/javaLangObject.java") { cls -> val fn = cls.members(DocumentationNode.Kind.Function).single() |