Skip to content

Commit 4626919

Browse files
onewhldenis-fokin
authored andcommitted
Render links in the invokes part of JavaDocs (#1051)
Render links in invokes part of JavaDocs (cherry picked from commit a4cb23f)
1 parent 0a8d25b commit 4626919

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

utbot-summary-tests/src/test/kotlin/examples/structures/SummaryMinStackTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ class SummaryMinStackTest : SummaryTestCaseGeneratorTest(
130130
val summary7 = "@utbot.classUnderTest {@link MinStack}\n" +
131131
"@utbot.methodUnderTest {@link org.utbot.examples.structures.MinStack#addValue(long)}\n" +
132132
"@utbot.executesCondition {@code (size == 0): False}\n" +
133-
"@utbot.invokes {@code {@link java.lang.Math#min(long,long)}}\n" +
133+
"@utbot.invokes {@link java.lang.Math#min(long,long)}\n" +
134134
"@utbot.throwsException {@link java.lang.ArrayIndexOutOfBoundsException} in: minStack[size] = Math.min(minStack[size - 1], value);"
135135
val summary8 = "@utbot.classUnderTest {@link MinStack}\n" +
136136
"@utbot.methodUnderTest {@link org.utbot.examples.structures.MinStack#addValue(long)}\n" +
137137
"@utbot.executesCondition {@code (size == 0): True}\n"
138138
val summary9 = "@utbot.classUnderTest {@link MinStack}\n" +
139139
"@utbot.methodUnderTest {@link org.utbot.examples.structures.MinStack#addValue(long)}\n" +
140140
"@utbot.executesCondition {@code (size == 0): False}\n" +
141-
"@utbot.invokes {@code {@link java.lang.Math#min(long,long)}}\n"
141+
"@utbot.invokes {@link java.lang.Math#min(long,long)}\n"
142142

143143
val methodName1 = "testAddValue_ThrowArrayIndexOutOfBoundsException"
144144
val methodName2 = "testAddValue_ThrowNullPointerException"

utbot-summary/src/main/kotlin/org/utbot/summary/comment/CustomJavaDocCommentBuilder.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class CustomJavaDocCommentBuilder(
8484
comment: CustomJavaDocComment
8585
) {
8686
when (statement.stmtType) {
87-
StmtType.Invoke -> comment.invokes += "{@code ${statement.description.replace(CARRIAGE_RETURN, "")}}"
87+
StmtType.Invoke -> comment.invokes += statement.description.replace(CARRIAGE_RETURN, "")
8888
StmtType.Condition -> comment.executesCondition += "{@code ${statement.description.replace(CARRIAGE_RETURN, "")}}"
8989
StmtType.Return -> comment.returnsFrom = "{@code ${statement.description.replace(CARRIAGE_RETURN, "")}}"
9090
StmtType.CaughtException -> comment.caughtException = "{@code ${statement.description.replace(CARRIAGE_RETURN, "")}}"

0 commit comments

Comments
 (0)