cargo test

This commit is contained in:
Alex Vasilev 2023-01-21 00:42:29 +05:30
parent ddb2f8760b
commit 1ab58b190e

View File

@ -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(