Skip to content

Fix broken summary indention #1676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2023
Merged

Conversation

sofurihafe
Copy link
Member

Description

Test generated by Contest Estimator had summaries with bad formatting. This PR fixes the issue.
The problem was with mixing usage of print with '\n' inside and println.

There is a functional difference between the two. The first version outputs line breaks using the platform's preferred line separator. The second version outputs newline characters, which is likely to be inappropriate on Windows or Mac OS.
source

Fixes # (1667)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Automated Testing

utbot-samples.

Manual Scenario

Run contest estimator as described in the issue.
The following summaries will be generated, meaning that the indention problem was fixed.

///region FUZZER: SUCCESSFUL EXECUTIONS for method max(short[])

/**
 * @utbot.classUnderTest {@link com.google.common.primitives.Shorts}
 * @utbot.methodUnderTest {@link com.google.common.primitives.Shorts#max(short[])}
 */
@Test
public void testMaxReturnsZeroWithNonEmptyPrimitiveArray() {
    short[] shortArray = {java.lang.Short.MIN_VALUE, (short) 0, (short) 0};
    
    short actual = Shorts.max(shortArray);
    
    assertEquals((short) 0, actual);
}
///endregion

@sofurihafe sofurihafe force-pushed the andrey-t/broken_summary_indention branch from 77e9a63 to fde7bb2 Compare January 16, 2023 14:10
@sofurihafe sofurihafe linked an issue Jan 16, 2023 that may be closed by this pull request
@EgorkaKulikov EgorkaKulikov merged commit a6e1c83 into main Jan 16, 2023
@EgorkaKulikov EgorkaKulikov deleted the andrey-t/broken_summary_indention branch January 16, 2023 14:56
@alisevych alisevych added comp-summaries Something related to the method names, code comments and display names generation ctg-bug-fix PR is fixing a bug labels Jan 19, 2023
@alisevych alisevych added this to the 2023.03 Release milestone Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-summaries Something related to the method names, code comments and display names generation ctg-bug-fix PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad formatting in JavaDocs of contest estimator
3 participants