From 8843588fca7a6022b86800d5d2539594c0de93cf Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 24 Apr 2020 23:51:02 +0200 Subject: Convert tests to text-size --- crates/ra_hir_ty/src/tests/regression.rs | 278 +++++++++++++++---------------- 1 file changed, 139 insertions(+), 139 deletions(-) (limited to 'crates/ra_hir_ty/src/tests/regression.rs') diff --git a/crates/ra_hir_ty/src/tests/regression.rs b/crates/ra_hir_ty/src/tests/regression.rs index 61a6801fc..8a1292c7a 100644 --- a/crates/ra_hir_ty/src/tests/regression.rs +++ b/crates/ra_hir_ty/src/tests/regression.rs @@ -14,11 +14,11 @@ fn test() { } "#), @r###" - [11; 37) '{ l... {}; }': () - [20; 21) 'x': () - [24; 34) 'if true {}': () - [27; 31) 'true': bool - [32; 34) '{}': () + 11..37 '{ l... {}; }': () + 20..21 'x': () + 24..34 'if true {}': () + 27..31 'true': bool + 32..34 '{}': () "### ); } @@ -34,10 +34,10 @@ fn test(x: X) { } "#), @r###" - [20; 21) 'x': X - [26; 47) '{ ...eld; }': () - [32; 33) 'x': X - [32; 44) 'x.some_field': {unknown} + 20..21 'x': X + 26..47 '{ ...eld; }': () + 32..33 'x': X + 32..44 'x.some_field': {unknown} "### ); } @@ -55,14 +55,14 @@ fn test() { } "#), @r###" - [11; 89) '{ ... } }': () - [17; 21) 'X {}': {unknown} - [27; 87) 'match ... }': () - [33; 34) 'x': {unknown} - [45; 52) 'A::B {}': {unknown} - [56; 58) '()': () - [68; 74) 'A::Y()': {unknown} - [78; 80) '()': () + 11..89 '{ ... } }': () + 17..21 'X {}': {unknown} + 27..87 'match ... }': () + 33..34 'x': {unknown} + 45..52 'A::B {}': {unknown} + 56..58 '()': () + 68..74 'A::Y()': {unknown} + 78..80 '()': () "### ); } @@ -77,12 +77,12 @@ fn quux() { } "#), @r###" - [11; 41) '{ ...+ y; }': () - [21; 22) 'y': i32 - [25; 27) '92': i32 - [33; 34) '1': i32 - [33; 38) '1 + y': i32 - [37; 38) 'y': i32 + 11..41 '{ ...+ y; }': () + 21..22 'y': i32 + 25..27 '92': i32 + 33..34 '1': i32 + 33..38 '1 + y': i32 + 37..38 'y': i32 "### ); } @@ -99,13 +99,13 @@ fn test() { } "#), @r###" - [11; 48) '{ ...&y]; }': () - [21; 22) 'y': &{unknown} - [25; 32) 'unknown': &{unknown} - [38; 45) '[y, &y]': [&&{unknown}; _] - [39; 40) 'y': &{unknown} - [42; 44) '&y': &&{unknown} - [43; 44) 'y': &{unknown} + 11..48 '{ ...&y]; }': () + 21..22 'y': &{unknown} + 25..32 'unknown': &{unknown} + 38..45 '[y, &y]': [&&{unknown}; _] + 39..40 'y': &{unknown} + 42..44 '&y': &&{unknown} + 43..44 'y': &{unknown} "### ); } @@ -123,20 +123,20 @@ fn test() { } "#), @r###" - [11; 80) '{ ...x)]; }': () - [21; 22) 'x': &&{unknown} - [25; 32) 'unknown': &&{unknown} - [42; 43) 'y': &&{unknown} - [46; 53) 'unknown': &&{unknown} - [59; 77) '[(x, y..., &x)]': [(&&&{unknown}, &&&{unknown}); _] - [60; 66) '(x, y)': (&&&{unknown}, &&&{unknown}) - [61; 62) 'x': &&{unknown} - [64; 65) 'y': &&{unknown} - [68; 76) '(&y, &x)': (&&&{unknown}, &&&{unknown}) - [69; 71) '&y': &&&{unknown} - [70; 71) 'y': &&{unknown} - [73; 75) '&x': &&&{unknown} - [74; 75) 'x': &&{unknown} + 11..80 '{ ...x)]; }': () + 21..22 'x': &&{unknown} + 25..32 'unknown': &&{unknown} + 42..43 'y': &&{unknown} + 46..53 'unknown': &&{unknown} + 59..77 '[(x, y..., &x)]': [(&&&{unknown}, &&&{unknown}); _] + 60..66 '(x, y)': (&&&{unknown}, &&&{unknown}) + 61..62 'x': &&{unknown} + 64..65 'y': &&{unknown} + 68..76 '(&y, &x)': (&&&{unknown}, &&&{unknown}) + 69..71 '&y': &&&{unknown} + 70..71 'y': &&{unknown} + 73..75 '&x': &&&{unknown} + 74..75 'x': &&{unknown} "### ); } @@ -158,12 +158,12 @@ fn write() { } "#), @r###" - [54; 139) '{ ... } }': () - [60; 137) 'match ... }': () - [66; 83) 'someth...nknown': Maybe<{unknown}> - [94; 124) 'Maybe:...thing)': Maybe<{unknown}> - [106; 123) 'ref mu...ething': &mut {unknown} - [128; 130) '()': () + 54..139 '{ ... } }': () + 60..137 'match ... }': () + 66..83 'someth...nknown': Maybe<{unknown}> + 94..124 'Maybe:...thing)': Maybe<{unknown}> + 106..123 'ref mu...ething': &mut {unknown} + 128..130 '()': () "### ); } @@ -179,13 +179,13 @@ fn test_line_buffer() { } "#), @r###" - [23; 53) '{ ...n']; }': () - [29; 50) '&[0, b...b'\n']': &[u8; _] - [30; 50) '[0, b'...b'\n']': [u8; _] - [31; 32) '0': u8 - [34; 39) 'b'\n'': u8 - [41; 42) '1': u8 - [44; 49) 'b'\n'': u8 + 23..53 '{ ...n']; }': () + 29..50 '&[0, b...b'\n']': &[u8; _] + 30..50 '[0, b'...b'\n']': [u8; _] + 31..32 '0': u8 + 34..39 'b'\n'': u8 + 41..42 '1': u8 + 44..49 'b'\n'': u8 "### ); } @@ -202,14 +202,14 @@ pub fn compute() { } "#), @r###" - [18; 108) '{ ... } }': () - [24; 106) 'match ... }': () - [30; 37) 'nope!()': {unknown} - [48; 94) 'SizeSk...tail }': {unknown} - [82; 86) 'true': bool - [82; 86) 'true': bool - [88; 92) 'tail': {unknown} - [98; 100) '{}': () + 18..108 '{ ... } }': () + 24..106 'match ... }': () + 30..37 'nope!()': {unknown} + 48..94 'SizeSk...tail }': {unknown} + 82..86 'true': bool + 82..86 'true': bool + 88..92 'tail': {unknown} + 98..100 '{}': () "### ); } @@ -226,14 +226,14 @@ pub fn primitive_type() { } "#), @r###" - [25; 106) '{ ... } }': () - [31; 104) 'match ... }': () - [37; 42) '*self': {unknown} - [38; 42) 'self': {unknown} - [53; 91) 'Borrow...), ..}': {unknown} - [74; 86) 'Primitive(p)': {unknown} - [84; 85) 'p': {unknown} - [95; 97) '{}': () + 25..106 '{ ... } }': () + 31..104 'match ... }': () + 37..42 '*self': {unknown} + 38..42 'self': {unknown} + 53..91 'Borrow...), ..}': {unknown} + 74..86 'Primitive(p)': {unknown} + 84..85 'p': {unknown} + 95..97 '{}': () "### ); } @@ -260,29 +260,29 @@ fn extra_compiler_flags() { } "#), @r###" - [27; 323) '{ ... } }': () - [33; 321) 'for co... }': () - [37; 44) 'content': &{unknown} - [48; 61) 'doesnt_matter': {unknown} - [62; 321) '{ ... }': () - [76; 80) 'name': &&{unknown} - [83; 167) 'if doe... }': &&{unknown} - [86; 99) 'doesnt_matter': bool - [100; 129) '{ ... }': &&{unknown} - [114; 119) 'first': &&{unknown} - [135; 167) '{ ... }': &&{unknown} - [149; 157) '&content': &&{unknown} - [150; 157) 'content': &{unknown} - [182; 189) 'content': &{unknown} - [192; 314) 'if ICE... }': &{unknown} - [195; 232) 'ICE_RE..._VALUE': {unknown} - [195; 248) 'ICE_RE...&name)': bool - [242; 247) '&name': &&&{unknown} - [243; 247) 'name': &&{unknown} - [249; 277) '{ ... }': &&{unknown} - [263; 267) 'name': &&{unknown} - [283; 314) '{ ... }': &{unknown} - [297; 304) 'content': &{unknown} + 27..323 '{ ... } }': () + 33..321 'for co... }': () + 37..44 'content': &{unknown} + 48..61 'doesnt_matter': {unknown} + 62..321 '{ ... }': () + 76..80 'name': &&{unknown} + 83..167 'if doe... }': &&{unknown} + 86..99 'doesnt_matter': bool + 100..129 '{ ... }': &&{unknown} + 114..119 'first': &&{unknown} + 135..167 '{ ... }': &&{unknown} + 149..157 '&content': &&{unknown} + 150..157 'content': &{unknown} + 182..189 'content': &{unknown} + 192..314 'if ICE... }': &{unknown} + 195..232 'ICE_RE..._VALUE': {unknown} + 195..248 'ICE_RE...&name)': bool + 242..247 '&name': &&&{unknown} + 243..247 'name': &&{unknown} + 249..277 '{ ... }': &&{unknown} + 263..267 'name': &&{unknown} + 283..314 '{ ... }': &{unknown} + 297..304 'content': &{unknown} "### ); } @@ -303,11 +303,11 @@ fn test(query_response: Canonical>) { } "#), @r###" - [92; 106) 'query_response': Canonical> - [137; 167) '{ ...lue; }': () - [143; 164) '&query....value': &QueryResponse - [144; 158) 'query_response': Canonical> - [144; 164) 'query_....value': QueryResponse + 92..106 'query_response': Canonical> + 137..167 '{ ...lue; }': () + 143..164 '&query....value': &QueryResponse + 144..158 'query_response': Canonical> + 144..164 'query_....value': QueryResponse "### ); } @@ -322,9 +322,9 @@ fn test() { } "#), @r###" - ![0; 4) '0u32': u32 - [45; 70) '{ ...()); }': () - [55; 56) 'a': u32 + !0..4 '0u32': u32 + 45..70 '{ ...()); }': () + 55..56 'a': u32 "### ); } @@ -345,10 +345,10 @@ pub fn main_loop() { } "#), @r###" - [144; 146) '{}': () - [169; 198) '{ ...t(); }': () - [175; 193) 'FxHash...efault': fn default<{unknown}, FxHasher>() -> HashSet<{unknown}, FxHasher> - [175; 195) 'FxHash...ault()': HashSet<{unknown}, FxHasher> + 144..146 '{}': () + 169..198 '{ ...t(); }': () + 175..193 'FxHash...efault': fn default<{unknown}, FxHasher>() -> HashSet<{unknown}, FxHasher> + 175..195 'FxHash...ault()': HashSet<{unknown}, FxHasher> "### ); } @@ -375,13 +375,13 @@ fn issue_2669() { }"# ), @r###" - [147; 262) '{ ... }': () - [161; 164) 'end': fn end<{unknown}>() - [161; 166) 'end()': () - [199; 252) '{ ... }': () - [221; 223) '_x': ! - [230; 237) 'loop {}': ! - [235; 237) '{}': () + 147..262 '{ ... }': () + 161..164 'end': fn end<{unknown}>() + 161..166 'end()': () + 199..252 '{ ... }': () + 221..223 '_x': ! + 230..237 'loop {}': ! + 235..237 '{}': () "### ) } @@ -396,9 +396,9 @@ fn test() { } "#), @r###" - [26; 53) '{ ...oo() }': () - [32; 49) '::foo': {unknown} - [32; 51) '::foo': {unknown} + 32..51 ' - [489; 523) '{ ... }': () - [499; 503) 'self': SelectStatement - [499; 509) 'self.order': O - [499; 516) 'self.o...into()': dyn QueryFragment + 66..70 'self': Self + 268..272 'self': Self + 467..471 'self': SelectStatement + 489..523 '{ ... }': () + 499..503 'self': SelectStatement + 499..509 'self.order': O + 499..516 'self.o...into()': dyn QueryFragment "### ); } -- cgit v1.2.3