diff options
Diffstat (limited to 'crates/assists/src/tests')
-rw-r--r-- | crates/assists/src/tests/generated.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/crates/assists/src/tests/generated.rs b/crates/assists/src/tests/generated.rs index e84f208a3..960815bd9 100644 --- a/crates/assists/src/tests/generated.rs +++ b/crates/assists/src/tests/generated.rs | |||
@@ -460,6 +460,33 @@ struct Point { | |||
460 | } | 460 | } |
461 | 461 | ||
462 | #[test] | 462 | #[test] |
463 | fn doctest_generate_enum_match_method() { | ||
464 | check_doc_test( | ||
465 | "generate_enum_match_method", | ||
466 | r#####" | ||
467 | enum Version { | ||
468 | Undefined, | ||
469 | Minor$0, | ||
470 | Major, | ||
471 | } | ||
472 | "#####, | ||
473 | r#####" | ||
474 | enum Version { | ||
475 | Undefined, | ||
476 | Minor, | ||
477 | Major, | ||
478 | } | ||
479 | |||
480 | impl Version { | ||
481 | fn is_minor(&self) -> bool { | ||
482 | matches!(self, Self::Minor) | ||
483 | } | ||
484 | } | ||
485 | "#####, | ||
486 | ) | ||
487 | } | ||
488 | |||
489 | #[test] | ||
463 | fn doctest_generate_from_impl_for_enum() { | 490 | fn doctest_generate_from_impl_for_enum() { |
464 | check_doc_test( | 491 | check_doc_test( |
465 | "generate_from_impl_for_enum", | 492 | "generate_from_impl_for_enum", |