Skip to content

Commit

Permalink
Render links in the invokes part of JavaDocs (UnitTestBot#1051)
Browse files Browse the repository at this point in the history
Render links in invokes part of JavaDocs
  • Loading branch information
onewhl authored and AbdullinAM committed Oct 17, 2022
1 parent e1993a5 commit ce60352
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ 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" +
"@utbot.executesCondition {@code (size == 0): True}\n"
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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, "")}}"
Expand Down

0 comments on commit ce60352

Please sign in to comment.