From db2a989565ea2b3d3c06e34cd385cfb574a32fbb Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 13 Apr 2021 12:20:54 +0300 Subject: internal: don't use `#[should_panic]` for tests --- crates/ide_assists/src/handlers/flip_comma.rs | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'crates/ide_assists/src/handlers') diff --git a/crates/ide_assists/src/handlers/flip_comma.rs b/crates/ide_assists/src/handlers/flip_comma.rs index 7f5e75d34..99be5e090 100644 --- a/crates/ide_assists/src/handlers/flip_comma.rs +++ b/crates/ide_assists/src/handlers/flip_comma.rs @@ -66,26 +66,12 @@ mod tests { } #[test] - #[should_panic] fn flip_comma_before_punct() { // See https://github.com/rust-analyzer/rust-analyzer/issues/1619 // "Flip comma" assist shouldn't be applicable to the last comma in enum or struct // declaration body. - check_assist_target( - flip_comma, - "pub enum Test { \ - A,$0 \ - }", - ",", - ); - - check_assist_target( - flip_comma, - "pub struct Test { \ - foo: usize,$0 \ - }", - ",", - ); + check_assist_not_applicable(flip_comma, "pub enum Test { A,$0 }"); + check_assist_not_applicable(flip_comma, "pub struct Test { foo: usize,$0 }"); } #[test] -- cgit v1.2.3