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 From adac4fc2f21117486356063d82d79f8c3add084a Mon Sep 17 00:00:00 2001 From: bravomikekilo Date: Sun, 24 Nov 2019 13:14:57 +0800 Subject: do refact and fix some issue --- crates/ra_assists/src/doc_tests/generated.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 1ccc016d3..3c716c2d1 100644 --- a/crates/ra_assists/src/doc_tests/generated.rs +++ b/crates/ra_assists/src/doc_tests/generated.rs @@ -347,12 +347,12 @@ fn doctest_invert_if() { "invert_if", r#####" fn main() { - if<|> !y {A} else {B} + if<|> !y { A } else { B } } "#####, r#####" fn main() { - if y {B} else {A} + if y { B } else { A } } "#####, ) -- cgit v1.2.3