Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/tests/generated.rs')
-rw-r--r--crates/ide-assists/src/tests/generated.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/ide-assists/src/tests/generated.rs b/crates/ide-assists/src/tests/generated.rs
index c1799b48ed..87c3d166ee 100644
--- a/crates/ide-assists/src/tests/generated.rs
+++ b/crates/ide-assists/src/tests/generated.rs
@@ -1025,6 +1025,24 @@ fn bar(name: i32) -> i32 {
}
#[test]
+fn doctest_extract_static() {
+ check_doc_test(
+ "extract_static",
+ r#####"
+fn main() {
+ $0(1 + 2)$0 * 4;
+}
+"#####,
+ r#####"
+fn main() {
+ static $0VAR_NAME: i32 = 1 + 2;
+ VAR_NAME * 4;
+}
+"#####,
+ )
+}
+
+#[test]
fn doctest_extract_struct_from_enum_variant() {
check_doc_test(
"extract_struct_from_enum_variant",