From a4cb23fdef5ed27696b9b74b33659db70279db90 Mon Sep 17 00:00:00 2001 From: Zarina Kurbatova Date: Mon, 3 Oct 2022 12:44:27 +0300 Subject: [PATCH] Render links in the invokes part of JavaDocs (#1051) Render links in invokes part of JavaDocs --- .../test/kotlin/examples/structures/SummaryMinStackTest.kt | 4 ++-- .../org/utbot/summary/comment/CustomJavaDocCommentBuilder.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/utbot-summary-tests/src/test/kotlin/examples/structures/SummaryMinStackTest.kt b/utbot-summary-tests/src/test/kotlin/examples/structures/SummaryMinStackTest.kt index 3301fb1a26..0b8d9f35f5 100644 --- a/utbot-summary-tests/src/test/kotlin/examples/structures/SummaryMinStackTest.kt +++ b/utbot-summary-tests/src/test/kotlin/examples/structures/SummaryMinStackTest.kt @@ -130,7 +130,7 @@ class SummaryMinStackTest : SummaryTestCaseGeneratorTest( val summary7 = "@utbot.classUnderTest {@link MinStack}\n" + "@utbot.methodUnderTest {@link org.utbot.examples.structures.MinStack#addValue(long)}\n" + "@utbot.executesCondition {@code (size == 0): False}\n" + - "@utbot.invokes {@code {@link java.lang.Math#min(long,long)}}\n" + + "@utbot.invokes {@link java.lang.Math#min(long,long)}\n" + "@utbot.throwsException {@link java.lang.ArrayIndexOutOfBoundsException} in: minStack[size] = Math.min(minStack[size - 1], value);" val summary8 = "@utbot.classUnderTest {@link MinStack}\n" + "@utbot.methodUnderTest {@link org.utbot.examples.structures.MinStack#addValue(long)}\n" + @@ -138,7 +138,7 @@ class SummaryMinStackTest : SummaryTestCaseGeneratorTest( val summary9 = "@utbot.classUnderTest {@link MinStack}\n" + "@utbot.methodUnderTest {@link org.utbot.examples.structures.MinStack#addValue(long)}\n" + "@utbot.executesCondition {@code (size == 0): False}\n" + - "@utbot.invokes {@code {@link java.lang.Math#min(long,long)}}\n" + "@utbot.invokes {@link java.lang.Math#min(long,long)}\n" val methodName1 = "testAddValue_ThrowArrayIndexOutOfBoundsException" val methodName2 = "testAddValue_ThrowNullPointerException" diff --git a/utbot-summary/src/main/kotlin/org/utbot/summary/comment/CustomJavaDocCommentBuilder.kt b/utbot-summary/src/main/kotlin/org/utbot/summary/comment/CustomJavaDocCommentBuilder.kt index 72e3385b49..62eb0e1d29 100644 --- a/utbot-summary/src/main/kotlin/org/utbot/summary/comment/CustomJavaDocCommentBuilder.kt +++ b/utbot-summary/src/main/kotlin/org/utbot/summary/comment/CustomJavaDocCommentBuilder.kt @@ -84,7 +84,7 @@ class CustomJavaDocCommentBuilder( comment: CustomJavaDocComment ) { when (statement.stmtType) { - StmtType.Invoke -> comment.invokes += "{@code ${statement.description.replace(CARRIAGE_RETURN, "")}}" + StmtType.Invoke -> comment.invokes += statement.description.replace(CARRIAGE_RETURN, "") StmtType.Condition -> comment.executesCondition += "{@code ${statement.description.replace(CARRIAGE_RETURN, "")}}" StmtType.Return -> comment.returnsFrom = "{@code ${statement.description.replace(CARRIAGE_RETURN, "")}}" StmtType.CaughtException -> comment.caughtException = "{@code ${statement.description.replace(CARRIAGE_RETURN, "")}}"