From 4a1b8a981389a0459284ba62aa5d00cc0d44e454 Mon Sep 17 00:00:00 2001 From: vmishenev Date: Fri, 12 Nov 2021 04:43:25 +0300 Subject: Unite platforms bookmarks rows (#2219) --- .../kotlin/content/params/ContentForParamsTest.kt | 285 ++++++++++----------- .../content/seealso/ContentForSeeAlsoTest.kt | 103 ++++---- .../kotlin/linkableContent/LinkableContentTest.kt | 2 - 3 files changed, 178 insertions(+), 212 deletions(-) (limited to 'plugins/base/src/test') diff --git a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt index 75731665..664b8282 100644 --- a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt +++ b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt @@ -451,23 +451,21 @@ class ContentForParamsTest : BaseAbstractTest() { after { group { pWrapped("a normal comment") } header(2) { +"Throws" } - platformHinted { - table { + table { + group { group { - group { - link { +"java.lang.IllegalStateException" } - } - comment { +"if the Dialog has not yet been created (before onCreateDialog) or has been destroyed (after onDestroyView)." } + link { +"java.lang.IllegalStateException" } } + comment { +"if the Dialog has not yet been created (before onCreateDialog) or has been destroyed (after onDestroyView)." } + } + group { group { - group { - link { +"java.lang.RuntimeException" } - } - comment { - +"when " - link { +"Hash Map" } - +" doesn't contain value." - } + link { +"java.lang.RuntimeException" } + } + comment { + +"when " + link { +"Hash Map" } + +" doesn't contain value." } } } @@ -510,39 +508,37 @@ class ContentForParamsTest : BaseAbstractTest() { after { group { pWrapped("a normal comment") } header(2) { +"Throws" } - platformHinted { - table { + table { + group { group { - group { - link { - check { - assertEquals( - "java.lang/IllegalStateException///PointingToDeclaration/", - (this as ContentDRILink).address.toString() - ) - } - +"java.lang.IllegalStateException" + link { + check { + assertEquals( + "java.lang/IllegalStateException///PointingToDeclaration/", + (this as ContentDRILink).address.toString() + ) } + +"java.lang.IllegalStateException" } - comment { +"if the Dialog has not yet been created (before onCreateDialog) or has been destroyed (after onDestroyView)." } } + comment { +"if the Dialog has not yet been created (before onCreateDialog) or has been destroyed (after onDestroyView)." } + } + group { group { - group { - link { - check { - assertEquals( - "java.lang/RuntimeException///PointingToDeclaration/", - (this as ContentDRILink).address.toString() - ) - } - +"java.lang.RuntimeException" + link { + check { + assertEquals( + "java.lang/RuntimeException///PointingToDeclaration/", + (this as ContentDRILink).address.toString() + ) } + +"java.lang.RuntimeException" } - comment { - +"when " - link { +"Hash Map" } - +" doesn't contain value." - } + } + comment { + +"when " + link { +"Hash Map" } + +" doesn't contain value." } } } @@ -590,44 +586,43 @@ class ContentForParamsTest : BaseAbstractTest() { after { group { pWrapped("a normal comment") } header(2) { +"Throws" } - platformHinted { - table { + table { + group { group { - group { - link { - check { - assertEquals( - "java.lang/IllegalStateException///PointingToDeclaration/", - (this as ContentDRILink).address.toString() - ) - } - +"java.lang.IllegalStateException" + link { + check { + assertEquals( + "java.lang/IllegalStateException///PointingToDeclaration/", + (this as ContentDRILink).address.toString() + ) } + +"java.lang.IllegalStateException" } - comment { +"if the Dialog has not yet been created (before onCreateDialog) or has been destroyed (after onDestroyView)." } } + comment { +"if the Dialog has not yet been created (before onCreateDialog) or has been destroyed (after onDestroyView)." } + } + group { group { - group { - link { - check { - assertEquals( - "java.lang/RuntimeException///PointingToDeclaration/", - (this as ContentDRILink).address.toString() - ) - } - +"java.lang.RuntimeException" + link { + check { + assertEquals( + "java.lang/RuntimeException///PointingToDeclaration/", + (this as ContentDRILink).address.toString() + ) } - } - comment { - +"when " - link { +"Hash Map" } - +" doesn't contain value." + +"java.lang.RuntimeException" } } + comment { + +"when " + link { +"Hash Map" } + +" doesn't contain value." + } } } } } + } } } @@ -726,14 +721,12 @@ class ContentForParamsTest : BaseAbstractTest() { } header(2) { +"Parameters" } group { - platformHinted { - table { - group { - +"testParam" - comment { - +"Sample description for test param that has a type of " - link { +"String" } - } + table { + group { + +"testParam" + comment { + +"Sample description for test param that has a type of " + link { +"String" } } } } @@ -1016,12 +1009,10 @@ class ContentForParamsTest : BaseAbstractTest() { group { pWrapped("comment to function") } header(2) { +"Parameters" } group { - platformHinted { - table { - group { - +"abc" - group { group { +"comment to param" } } - } + table { + group { + +"abc" + group { group { +"comment to param" } } } } } @@ -1071,20 +1062,18 @@ class ContentForParamsTest : BaseAbstractTest() { group { group { group { +"comment to function" } } } header(2) { +"Parameters" } group { - platformHinted { - table { - group { - +"first" - group { group { +"comment to first param" } } - } - group { - +"second" - group { group { +"comment to second param" } } - } - group { - +"third" - group { group { +"comment to third param" } } - } + table { + group { + +"first" + group { group { +"comment to first param" } } + } + group { + +"second" + group { group { +"comment to second param" } } + } + group { + +"third" + group { group { +"comment to third param" } } } } } @@ -1135,20 +1124,18 @@ class ContentForParamsTest : BaseAbstractTest() { group { group { group { +"comment to function" } } } header(2) { +"Parameters" } group { - platformHinted { - table { - group { - +"c" - group { group { +"comment to c param" } } - } - group { - +"b" - group { group { +"comment to b param" } } - } - group { - +"a" - group { group { +"comment to a param" } } - } + table { + group { + +"c" + group { group { +"comment to c param" } } + } + group { + +"b" + group { group { +"comment to b param" } } + } + group { + +"a" + group { group { +"comment to a param" } } } } } @@ -1196,20 +1183,18 @@ class ContentForParamsTest : BaseAbstractTest() { after { header(2) { +"Parameters" } group { - platformHinted { - table { - group { - +"first" - group { group { +"comment to first param" } } - } - group { - +"second" - group { group { +"comment to second param" } } - } - group { - +"third" - group { group { +"comment to third param" } } - } + table { + group { + +"first" + group { group { +"comment to first param" } } + } + group { + +"second" + group { group { +"comment to second param" } } + } + group { + +"third" + group { group { +"comment to third param" } } } } } @@ -1261,17 +1246,15 @@ class ContentForParamsTest : BaseAbstractTest() { after { group { pWrapped("comment to function") } group { - header(4){ +"Receiver" } + header(4) { +"Receiver" } pWrapped("comment to receiver") } header(2) { +"Parameters" } group { - platformHinted { - table { - group { - +"abc" - group { group { +"comment to param" } } - } + table { + group { + +"abc" + group { group { +"comment to param" } } } } } @@ -1320,16 +1303,14 @@ class ContentForParamsTest : BaseAbstractTest() { group { group { group { +"comment to function" } } } header(2) { +"Parameters" } group { - platformHinted { - table { - group { - +"first" - group { group { +"comment to first param" } } - } - group { - +"third" - group { group { +"comment to third param" } } - } + table { + group { + +"first" + group { group { +"comment to first param" } } + } + group { + +"third" + group { group { +"comment to third param" } } } } } @@ -1384,20 +1365,18 @@ class ContentForParamsTest : BaseAbstractTest() { header(2) { +"Parameters" } group { - platformHinted { - table { - group { - +"first" - group { group { +"comment to first param" } } - } - group { - +"second" - group { group { +"comment to second param" } } - } - group { - +"third" - group { group { +"comment to third param" } } - } + table { + group { + +"first" + group { group { +"comment to first param" } } + } + group { + +"second" + group { group { +"comment to second param" } } + } + group { + +"third" + group { group { +"comment to third param" } } } } } diff --git a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt index e9a54e87..4096640a 100644 --- a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt +++ b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt @@ -99,13 +99,11 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { after { header(2) { +"See also" } group { - platformHinted { - table { - group { - //DRI should be "test//abc/#/-1/" - link { +"abc" } - group { } - } + table { + group { + //DRI should be "test//abc/#/-1/" + link { +"abc" } + group { } } } } @@ -154,14 +152,12 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { after { header(2) { +"See also" } group { - platformHinted { - table { + table { + group { + //DRI should be "test//abc/#/-1/" + link { +"abc" } group { - //DRI should be "test//abc/#/-1/" - link { +"abc" } - group { - group { +"Comment to abc" } - } + group { +"Comment to abc" } } } } @@ -211,17 +207,18 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { after { header(2) { +"See also" } group { - platformHinted { - table { - group { - link { - check { - assertEquals("kotlin.collections/Collection///PointingToDeclaration/", (this as ContentDRILink).address.toString()) - } - +"kotlin.collections.Collection" + table { + group { + link { + check { + assertEquals( + "kotlin.collections/Collection///PointingToDeclaration/", + (this as ContentDRILink).address.toString() + ) } - group { } + +"kotlin.collections.Collection" } + group { } } } } @@ -270,14 +267,12 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { after { header(2) { +"See also" } group { - platformHinted { - table { + table { + group { + //DRI should be "test//abc/#/-1/" + link { +"kotlin.collections.Collection" } group { - //DRI should be "test//abc/#/-1/" - link { +"kotlin.collections.Collection" } - group { - group { +"Comment to stdliblink" } - } + group { +"Comment to stdliblink" } } } } @@ -328,20 +323,18 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { ) } after { - group { comment { +"random comment"} } + group { comment { +"random comment" } } unnamedTag("Author") { comment { +"pikinier20" } } unnamedTag("Since") { comment { +"0.11" } } header(2) { +"See also" } group { - platformHinted { - table { + table { + group { + //DRI should be "test//abc/#/-1/" + link { +"kotlin.collections.Collection" } group { - //DRI should be "test//abc/#/-1/" - link { +"kotlin.collections.Collection" } - group { - group { +"Comment to stdliblink" } - } + group { +"Comment to stdliblink" } } } } @@ -392,14 +385,12 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { after { header(2) { +"See also" } group { - platformHinted { - table { + table { + group { + //DRI should be "test//abc/#/-1/" + link { +"abc" } group { - //DRI should be "test//abc/#/-1/" - link { +"abc" } - group { - group { +"Comment to abc2" } - } + group { +"Comment to abc2" } } } } @@ -450,21 +441,19 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { after { header(2) { +"See also" } group { - platformHinted { - table { + table { + group { + //DRI should be "test//abc/#/-1/" + link { +"abc" } group { - //DRI should be "test//abc/#/-1/" - link { +"abc" } - group { - group { +"Comment to abc1" } - } - } - group { - //DRI should be "test//abc/#/-1/" - link { +"kotlin.collections.Collection" } - group { group { +"Comment to collection" } } + group { +"Comment to abc1" } } } + group { + //DRI should be "test//abc/#/-1/" + link { +"kotlin.collections.Collection" } + group { group { +"Comment to collection" } } + } } } } diff --git a/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt b/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt index b9107d53..3b0f6eef 100644 --- a/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt +++ b/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt @@ -202,8 +202,6 @@ class LinkableContentTest : BaseAbstractTest() { .cast().after .cast().children.last() .cast().children.last() - .cast().children.single() - .cast().children.single() .cast().children.single() .cast().children.single().cast().text Assertions.assertEquals( -- cgit