cargo test
This commit is contained in:
parent
ddb2f8760b
commit
1ab58b190e
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user