aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_assists/src/tests
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-15 17:40:14 +0000
committerGitHub <[email protected]>2021-03-15 17:40:14 +0000
commit1f28345b37130659438a8d2427f8879a19a14ae9 (patch)
tree120e085c1fb07e7ca0df7269936eb749827e2735 /crates/ide_assists/src/tests
parentce3125165a6658318def7c49f415ea7f5e9dce92 (diff)
parent0c2d4a8a7758793765d33790e22c70b79b8bea56 (diff)
Merge #8037
8037: Assist is empty 7709 r=Veykril a=chetankhilosiya Updated the implementation to get the function from implementation Co-authored-by: Chetan Khilosiya <[email protected]>
Diffstat (limited to 'crates/ide_assists/src/tests')
-rw-r--r--crates/ide_assists/src/tests/generated.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/crates/ide_assists/src/tests/generated.rs b/crates/ide_assists/src/tests/generated.rs
index 3f77edd8d..736027ff0 100644
--- a/crates/ide_assists/src/tests/generated.rs
+++ b/crates/ide_assists/src/tests/generated.rs
@@ -722,6 +722,35 @@ impl<T: Clone> Ctx<T> {
722} 722}
723 723
724#[test] 724#[test]
725fn doctest_generate_is_empty_from_len() {
726 check_doc_test(
727 "generate_is_empty_from_len",
728 r#####"
729struct MyStruct { data: Vec<String> }
730
731impl MyStruct {
732 p$0ub fn len(&self) -> usize {
733 self.data.len()
734 }
735}
736"#####,
737 r#####"
738struct MyStruct { data: Vec<String> }
739
740impl MyStruct {
741 pub fn len(&self) -> usize {
742 self.data.len()
743 }
744
745 pub fn is_empty(&self) -> bool {
746 self.len() == 0
747 }
748}
749"#####,
750 )
751}
752
753#[test]
725fn doctest_generate_new() { 754fn doctest_generate_new() {
726 check_doc_test( 755 check_doc_test(
727 "generate_new", 756 "generate_new",