Skip to content

Minimize convert_integer_literal tests #6455

@matklad

Description

@matklad

There are a lot of tests for this assist: https://github.com/rust-analyzer/rust-analyzer/blob/060c8b2c96a0de4a131c4d780d2aac80afe13de8/crates/assists/src/handlers/convert_integer_literal.rs

I think the test look like MxN matrix, and mostly hit the same code paths over and other again. We should minimize the test suite to cover all interesting paths with as few tests as possible.

And advanced way to find redundant tests is by setting up coverage (haven't done this before for rust though). But I guess in this case, we can just eyeball duplication.

See also https://github.com/rust-analyzer/rust-analyzer/blob/060c8b2c96a0de4a131c4d780d2aac80afe13de8/docs/dev/style.md#minimal-tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions