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 69ea200db1..c1799b48ed 100644
--- a/crates/ide-assists/src/tests/generated.rs
+++ b/crates/ide-assists/src/tests/generated.rs
@@ -933,6 +933,24 @@ enum TheEnum {
}
#[test]
+fn doctest_extract_constant() {
+ check_doc_test(
+ "extract_constant",
+ r#####"
+fn main() {
+ $0(1 + 2)$0 * 4;
+}
+"#####,
+ r#####"
+fn main() {
+ const $0VAR_NAME: i32 = 1 + 2;
+ VAR_NAME * 4;
+}
+"#####,
+ )
+}
+
+#[test]
fn doctest_extract_expressions_from_format_string() {
check_doc_test(
"extract_expressions_from_format_string",