Skip to content

Replace check_expect test functions that assert by debug equality #14268

Closed
@Veykril

Description

@Veykril

We have a bunch of test fixtures which currently assert outputs via the debug representation of things. These are annoying as the debug representation can change in many ways (even by just upgrading the compiler version which did happen in the past). We should get rid of those and replace them with better expected output.

An example of such a function is the following here

#[track_caller]
pub(super) fn check_expect(config: InlayHintsConfig, ra_fixture: &str, expect: Expect) {
let (analysis, file_id) = fixture::file(ra_fixture);
let inlay_hints = analysis.inlay_hints(&config, file_id, None).unwrap();
expect.assert_debug_eq(&inlay_hints)
}

Metadata

Metadata

Assignees

Labels

A-infraCI and workflow issuesC-enhancementCategory: enhancementE-unknownIt's unclear if the issue is E-hard or E-easy without digging in

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions