aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_assists/src/tests
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-31 13:26:57 +0100
committerGitHub <[email protected]>2021-03-31 13:26:57 +0100
commit75011bbccbf2e00092222a1071ba9111f834a4ae (patch)
tree4e39b7bd20df44f57ab57c27ce1a3a71362b077f /crates/ide_assists/src/tests
parentaca9004c7e4bafe1fc60d0e0298f5687b2e7615a (diff)
parent3c6c1c99b41e2a3c9a31b0d4c73d660399255cba (diff)
Merge #8210
8210: Implement "Extract type alias" assist r=jonas-schievink a=jonas-schievink Co-authored-by: Jonas Schievink <[email protected]> Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/ide_assists/src/tests')
-rw-r--r--crates/ide_assists/src/tests/generated.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/ide_assists/src/tests/generated.rs b/crates/ide_assists/src/tests/generated.rs
index 736027ff0..03b7fb366 100644
--- a/crates/ide_assists/src/tests/generated.rs
+++ b/crates/ide_assists/src/tests/generated.rs
@@ -329,6 +329,25 @@ enum A { One(One) }
329} 329}
330 330
331#[test] 331#[test]
332fn doctest_extract_type_alias() {
333 check_doc_test(
334 "extract_type_alias",
335 r#####"
336struct S {
337 field: $0(u8, u8, u8)$0,
338}
339"#####,
340 r#####"
341type $0Type = (u8, u8, u8);
342
343struct S {
344 field: Type,
345}
346"#####,
347 )
348}
349
350#[test]
332fn doctest_extract_variable() { 351fn doctest_extract_variable() {
333 check_doc_test( 352 check_doc_test(
334 "extract_variable", 353 "extract_variable",