diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-13 10:23:24 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-13 10:23:24 +0100 |
commit | 11e7371df7b7ba7f47ae4892eb8b0f98b371de70 (patch) | |
tree | 27d88010e9441d2af973f04c9b979220b0b07ebf /crates/ide_assists/src/handlers/flip_comma.rs | |
parent | 6081b437cc842f8885c26636bef8af4cbc5483e3 (diff) | |
parent | db2a989565ea2b3d3c06e34cd385cfb574a32fbb (diff) |
Merge #8499
8499: internal: don't use `#[should_panic]` for tests r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide_assists/src/handlers/flip_comma.rs')
-rw-r--r-- | crates/ide_assists/src/handlers/flip_comma.rs | 18 |
1 files changed, 2 insertions, 16 deletions
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 { | |||
66 | } | 66 | } |
67 | 67 | ||
68 | #[test] | 68 | #[test] |
69 | #[should_panic] | ||
70 | fn flip_comma_before_punct() { | 69 | fn flip_comma_before_punct() { |
71 | // See https://github.com/rust-analyzer/rust-analyzer/issues/1619 | 70 | // See https://github.com/rust-analyzer/rust-analyzer/issues/1619 |
72 | // "Flip comma" assist shouldn't be applicable to the last comma in enum or struct | 71 | // "Flip comma" assist shouldn't be applicable to the last comma in enum or struct |
73 | // declaration body. | 72 | // declaration body. |
74 | check_assist_target( | 73 | check_assist_not_applicable(flip_comma, "pub enum Test { A,$0 }"); |
75 | flip_comma, | 74 | check_assist_not_applicable(flip_comma, "pub struct Test { foo: usize,$0 }"); |
76 | "pub enum Test { \ | ||
77 | A,$0 \ | ||
78 | }", | ||
79 | ",", | ||
80 | ); | ||
81 | |||
82 | check_assist_target( | ||
83 | flip_comma, | ||
84 | "pub struct Test { \ | ||
85 | foo: usize,$0 \ | ||
86 | }", | ||
87 | ",", | ||
88 | ); | ||
89 | } | 75 | } |
90 | 76 | ||
91 | #[test] | 77 | #[test] |