Skip to content

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

@Vladislav0Art

Description

@Vladislav0Art

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    new featureImplementation of a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions