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

Prohibit line-based test generation for meaningless line types (comments, single brackets, etc) #378

Open
Vladislav0Art opened this issue Oct 8, 2024 · 0 comments
Labels
improvement New feature

Comments

@Vladislav0Art
Copy link
Collaborator

We are not allowing line generation for empty lines, but it can be asked for comment lines (or brackets) if it is surrounded by class/function. The result will be almost identical to the whole class test generation, but it's weird.

In the following case, we cannot generate line-based test for (*) but we can do it for (**) (likely, because this comment is considered as part of a method):

// my comment here! - not allowed for line generation (*)

// my comment here! - allowed for line generation (**)
fun multwice(a: Int) = a * 2

Solution idea: For each line generation, check if it includes something besides comments, open/closed brackets and allow generation only in such case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement New feature
Projects
None yet
Development

No branches or pull requests

1 participant