Skip to content

Exclude protected kotlin methods from generate window #1373

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

Conversation

sofurihafe
Copy link
Member

Description

This PR makes protected kotlin methods being excluded from generate window, because we cannot access them as described in the following issue.

Fixes # (1280)

Type of Change

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

How Has This Been Tested?

Automated Testing

utbot-samples

Manual Scenario

Try to generate the kotlin test in plugin for the following code:

class SimpleClass {
    protected fun substract(a: Int, b: Int): Int {
        return a - b
    }
}

Verify that there is no substract method in generate window.

@sofurihafe sofurihafe linked an issue Nov 15, 2022 that may be closed by this pull request
Copy link
Collaborator

@volivan239 volivan239 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also exclude testing Kotlin protected members in cli (by similar checks in somewhere like org.utbot.cli.GenerateTestsCommand#run). However, right now even private methods are not filtered there, so it seems like another ticket

@sofurihafe sofurihafe force-pushed the andrey-t/1280-dont-show-protected-kotlin-methods branch from 7409c25 to 937ccb6 Compare November 15, 2022 12:38
@EgorkaKulikov EgorkaKulikov merged commit 02942e2 into main Nov 15, 2022
@EgorkaKulikov EgorkaKulikov deleted the andrey-t/1280-dont-show-protected-kotlin-methods branch November 15, 2022 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not suggest to test Kotlin protected methods
3 participants