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.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/crates/assists/src/tests/generated.rs b/crates/assists/src/tests/generated.rs
index e84f208a3..0dbb05f2a 100644
--- a/crates/assists/src/tests/generated.rs
+++ b/crates/assists/src/tests/generated.rs
@@ -460,6 +460,34 @@ 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 /// Returns `true` if the version is [`Minor`].
482 fn is_minor(&self) -> bool {
483 matches!(self, Self::Minor)
484 }
485}
486"#####,
487 )
488}
489
490#[test]
463fn doctest_generate_from_impl_for_enum() { 491fn doctest_generate_from_impl_for_enum() {
464 check_doc_test( 492 check_doc_test(
465 "generate_from_impl_for_enum", 493 "generate_from_impl_for_enum",