aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/tests/generated.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/assists/src/tests/generated.rs')
-rw-r--r--crates/assists/src/tests/generated.rs42
1 files changed, 23 insertions, 19 deletions
diff --git a/crates/assists/src/tests/generated.rs b/crates/assists/src/tests/generated.rs
index 168e1626a..629788f05 100644
--- a/crates/assists/src/tests/generated.rs
+++ b/crates/assists/src/tests/generated.rs
@@ -3,25 +3,6 @@
3use super::check_doc_test; 3use super::check_doc_test;
4 4
5#[test] 5#[test]
6fn doctest_add_custom_impl() {
7 check_doc_test(
8 "add_custom_impl",
9 r#####"
10#[derive(Deb<|>ug, Display)]
11struct S;
12"#####,
13 r#####"
14#[derive(Display)]
15struct S;
16
17impl Debug for S {
18 $0
19}
20"#####,
21 )
22}
23
24#[test]
25fn doctest_add_explicit_type() { 6fn doctest_add_explicit_type() {
26 check_doc_test( 7 check_doc_test(
27 "add_explicit_type", 8 "add_explicit_type",
@@ -832,6 +813,29 @@ const test: Foo = Foo {foo: 1, bar: 0}
832} 813}
833 814
834#[test] 815#[test]
816fn doctest_replace_derive_with_manual_impl() {
817 check_doc_test(
818 "replace_derive_with_manual_impl",
819 r#####"
820trait Debug { fn fmt(&self, f: &mut Formatter) -> Result<()>; }
821#[derive(Deb<|>ug, Display)]
822struct S;
823"#####,
824 r#####"
825trait Debug { fn fmt(&self, f: &mut Formatter) -> Result<()>; }
826#[derive(Display)]
827struct S;
828
829impl Debug for S {
830 fn fmt(&self, f: &mut Formatter) -> Result<()> {
831 ${0:todo!()}
832 }
833}
834"#####,
835 )
836}
837
838#[test]
835fn doctest_replace_if_let_with_match() { 839fn doctest_replace_if_let_with_match() {
836 check_doc_test( 840 check_doc_test(
837 "replace_if_let_with_match", 841 "replace_if_let_with_match",