From 1ab58b190e03534ec13bbe0828e69a66517eaf9a Mon Sep 17 00:00:00 2001 From: Alex Vasilev Date: Sat, 21 Jan 2023 00:42:29 +0530 Subject: [PATCH] cargo test --- crates/ide-assists/src/tests/generated.rs | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/crates/ide-assists/src/tests/generated.rs b/crates/ide-assists/src/tests/generated.rs index 16a06b60de9..8a25e1f648a 100644 --- a/crates/ide-assists/src/tests/generated.rs +++ b/crates/ide-assists/src/tests/generated.rs @@ -2,6 +2,31 @@ use super::check_doc_test; +#[test] +fn doctest_add_braces() { + check_doc_test( + "add_braces", + r#####" +fn foo(n: i32) -> i32 { + match n { + 1 =>$0 n + 1, + _ => 0 + } +} +"#####, + r#####" +fn foo(n: i32) -> i32 { + match n { + 1 => { + n + 1 + }, + _ => 0 + } +} +"#####, + ) +} + #[test] fn doctest_add_explicit_type() { check_doc_test(