From 8a8be062194604360bbb27ee11961b8a72973f44 Mon Sep 17 00:00:00 2001 From: bravomikekilo Date: Fri, 22 Nov 2019 02:51:40 +0800 Subject: initial invert_if --- crates/ra_assists/src/doc_tests/generated.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crates/ra_assists/src/doc_tests') diff --git a/crates/ra_assists/src/doc_tests/generated.rs b/crates/ra_assists/src/doc_tests/generated.rs index 176761efb..1ccc016d3 100644 --- a/crates/ra_assists/src/doc_tests/generated.rs +++ b/crates/ra_assists/src/doc_tests/generated.rs @@ -341,6 +341,23 @@ fn main() { ) } +#[test] +fn doctest_invert_if() { + check( + "invert_if", + r#####" +fn main() { + if<|> !y {A} else {B} +} +"#####, + r#####" +fn main() { + if y {B} else {A} +} +"#####, + ) +} + #[test] fn doctest_make_raw_string() { check( -- cgit v1.2.3