aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'crates/assists/src/tests')
-rw-r--r--crates/assists/src/tests/generated.rs27
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]
463fn doctest_generate_enum_match_method() {
464 check_doc_test(
465 "generate_enum_match_method",
466 r#####"
467enum Version {
468 Undefined,
469 Minor$0,
470 Major,
471}
472"#####,
473 r#####"
474enum Version {
475 Undefined,
476 Minor,
477 Major,
478}
479
480impl Version {
481 fn is_minor(&self) -> bool {
482 matches!(self, Self::Minor)
483 }
484}
485"#####,
486 )
487}
488
489#[test]
463fn doctest_generate_from_impl_for_enum() { 490fn 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",