Skip to content
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

Incorrect links in Java docs for classes without packages #1174

Closed
alisevych opened this issue Oct 18, 2022 · 0 comments · Fixed by #1317
Closed

Incorrect links in Java docs for classes without packages #1174

alisevych opened this issue Oct 18, 2022 · 0 comments · Fixed by #1317
Assignees
Labels
comp-summaries Something related to the method names, code comments and display names generation ctg-bug Issue is a bug

Comments

@alisevych
Copy link
Member

Description

Links in Java docs are starting with '.' if the tested class has no package and is placed in the Sources root.

To Reproduce

  1. Download UnitTestBot plugin from main
  2. Install it in IntelliJ Idea (remove previous)
  3. Open/create a project
  4. Add the following Java class to the Sources root - without package:
public class A {

    public int test(){
        return 1;
    }
}
  1. Generate tests with UnitTestBot... for it
  2. Wait tests are generated

Expected behavior

Links to classes/methods are supposed to be resolved.

Actual behavior

Links to the class / method are starting with '.' and cannot be resolved.
They are displayed red.

Visual proofs (screenshots, logs, images)

The following test class is generated:

image

image

public class ATest {
    ///region Test suites for executable A.test

    ///region FUZZER: SUCCESSFUL EXECUTIONS for method test()

    /**
     * @utbot.classUnderTest {@link .A}
     * @utbot.methodUnderTest {@link .A#test()}
     */
    @Test
    @DisplayName("test: arg_0 = A() -> return 1")
    public void testTestReturnsOne() {
        A a = new A();

        int actual = a.test();

        assertEquals(1, actual);
    }
    ///endregion

    ///endregion
}

Environment

Windows 10 Pro
IntelliJ IDEA 2022.1.4 (JBR 11) - 2022.2.3 (JBR 17)

@alisevych alisevych added ctg-bug Issue is a bug comp-summaries Something related to the method names, code comments and display names generation labels Oct 18, 2022
@korifey korifey moved this to Todo in UTBot Java Oct 18, 2022
@alisevych alisevych added this to the 2022.11 Release milestone Oct 18, 2022
Repository owner moved this from Todo to Done in UTBot Java Nov 29, 2022
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 Issue is a bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants