Skip to content

The rendering of some parts in plain JavaDocs is broken #1430

Closed
@amandelpie

Description

@amandelpie

Description

After the commit the rendering of generated JavaDocs was broken (some \n were missed as I see)

Looks like this change broke this utbot-framework/src/main/kotlin/org/utbot/framework/codegen/renderer/CgAbstractRenderer.kt:363

Please check the changes in rendering with some simple manual tests for Summaries generation

The ticket is related to the #1404, ask @alisevych for the test project, but I'm sure that you will obtain the same result on any piece of code from our samples

To Reproduce

  1. Run the 'lrs' project in IntelliJ Idea
  2. Run runIde
  3. Go to UtBot settings
  4. Summaries are on, default type is chosen—with plain Java docs tags (not custom tags)
  5. Generate tests for LongRangeType
  6. Open the generated test
  7. See wrong formatting.

Expected behavior

 /**
     * <pre>
     * Test  returns from: {@code return diff < min() || diff > max(); } 
     * </pre>
     */
    @Test
    @DisplayName("subtractionMayOverflow: return diff < min() || diff > max() : False -> return diff < min() || diff > max()")
    public void testSubtractionMayOverflow_DiffGreaterOrEqualMinOrDiffLessOrEqualMax() {
        LongRangeType longRangeType = LongRangeType.INT32;

        boolean actual = longRangeType.subtractionMayOverflow(128L, 256L);

        assertFalse(actual);
    }

Actual behavior

 /**
     * <pre>
     * Test  * returns from: {@code return diff < min() || diff > max(); } *
     * </pre>
     */
    @Test
    @DisplayName("subtractionMayOverflow: return diff < min() || diff > max() : False -> return diff < min() || diff > max()")
    public void testSubtractionMayOverflow_DiffGreaterOrEqualMinOrDiffLessOrEqualMax() {
        LongRangeType longRangeType = LongRangeType.INT32;

        boolean actual = longRangeType.subtractionMayOverflow(128L, 256L);

        assertFalse(actual);
    }

Additional context

Before the mentioned commit all works correctly

Metadata

Metadata

Labels

comp-summariesSomething related to the method names, code comments and display names generationctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions