Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide_assists/src/tests/generated.rs')
| -rw-r--r-- | crates/ide_assists/src/tests/generated.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/crates/ide_assists/src/tests/generated.rs b/crates/ide_assists/src/tests/generated.rs index e30f98bcd1..c67e15b2ce 100644 --- a/crates/ide_assists/src/tests/generated.rs +++ b/crates/ide_assists/src/tests/generated.rs @@ -840,6 +840,36 @@ struct Point { } #[test] +fn doctest_generate_documentation_template() { + check_doc_test( + "generate_documentation_template", + r#####" +pub fn my_$0func(a: i32, b: i32) -> Result<(), std::io::Error> { + unimplemented!() +} +"#####, + r#####" +/// . +/// +/// # Examples +/// +/// ``` +/// use test::my_func; +/// +/// assert_eq!(my_func(a, b), ); +/// ``` +/// +/// # Errors +/// +/// This function will return an error if . +pub fn my_func(a: i32, b: i32) -> Result<(), std::io::Error> { + unimplemented!() +} +"#####, + ) +} + +#[test] fn doctest_generate_enum_as_method() { check_doc_test( "generate_enum_as_method", |