diff options
Diffstat (limited to 'crates/ra_analysis/tests')
-rw-r--r-- | crates/ra_analysis/tests/tests.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_analysis/tests/tests.rs b/crates/ra_analysis/tests/tests.rs index 9417ddc1d..755640fb4 100644 --- a/crates/ra_analysis/tests/tests.rs +++ b/crates/ra_analysis/tests/tests.rs | |||
@@ -164,7 +164,7 @@ fn test_fn_signature_two_args_first() { | |||
164 | r#"fn foo(x: u32, y: u32) -> u32 {x + y} | 164 | r#"fn foo(x: u32, y: u32) -> u32 {x + y} |
165 | fn bar() { foo(<|>3, ); }"#); | 165 | fn bar() { foo(<|>3, ); }"#); |
166 | 166 | ||
167 | assert_eq!(desc.name, Some("foo".into())); | 167 | assert_eq!(desc.name, "foo".to_string()); |
168 | assert_eq!(desc.params, vec!("x".to_string(),"y".to_string())); | 168 | assert_eq!(desc.params, vec!("x".to_string(),"y".to_string())); |
169 | assert_eq!(desc.ret_type, Some("-> u32".into())); | 169 | assert_eq!(desc.ret_type, Some("-> u32".into())); |
170 | assert_eq!(param, Some(0)); | 170 | assert_eq!(param, Some(0)); |
@@ -176,7 +176,7 @@ fn test_fn_signature_two_args_second() { | |||
176 | r#"fn foo(x: u32, y: u32) -> u32 {x + y} | 176 | r#"fn foo(x: u32, y: u32) -> u32 {x + y} |
177 | fn bar() { foo(3, <|>); }"#); | 177 | fn bar() { foo(3, <|>); }"#); |
178 | 178 | ||
179 | assert_eq!(desc.name, Some("foo".into())); | 179 | assert_eq!(desc.name, "foo".to_string()); |
180 | assert_eq!(desc.params, vec!("x".to_string(),"y".to_string())); | 180 | assert_eq!(desc.params, vec!("x".to_string(),"y".to_string())); |
181 | assert_eq!(desc.ret_type, Some("-> u32".into())); | 181 | assert_eq!(desc.ret_type, Some("-> u32".into())); |
182 | assert_eq!(param, Some(1)); | 182 | assert_eq!(param, Some(1)); |
@@ -188,7 +188,7 @@ fn test_fn_signature_for_impl() { | |||
188 | r#"struct F; impl F { pub fn new() { F{}} } | 188 | r#"struct F; impl F { pub fn new() { F{}} } |
189 | fn bar() {let _ : F = F::new(<|>);}"#); | 189 | fn bar() {let _ : F = F::new(<|>);}"#); |
190 | 190 | ||
191 | assert_eq!(desc.name, Some("new".into())); | 191 | assert_eq!(desc.name, "new".to_string()); |
192 | assert_eq!(desc.params, Vec::<String>::new()); | 192 | assert_eq!(desc.params, Vec::<String>::new()); |
193 | assert_eq!(desc.ret_type, None); | 193 | assert_eq!(desc.ret_type, None); |
194 | assert_eq!(param, None); | 194 | assert_eq!(param, None); |
@@ -211,7 +211,7 @@ fn bar() { | |||
211 | f.do_it(<|>); | 211 | f.do_it(<|>); |
212 | }"#); | 212 | }"#); |
213 | 213 | ||
214 | assert_eq!(desc.name, Some("do_it".into())); | 214 | assert_eq!(desc.name, "do_it".to_string()); |
215 | assert_eq!(desc.params, vec!["&self".to_string()]); | 215 | assert_eq!(desc.params, vec!["&self".to_string()]); |
216 | assert_eq!(desc.ret_type, None); | 216 | assert_eq!(desc.ret_type, None); |
217 | assert_eq!(param, None); | 217 | assert_eq!(param, None); |
@@ -234,7 +234,7 @@ fn bar() { | |||
234 | f.do_it(<|>); | 234 | f.do_it(<|>); |
235 | }"#); | 235 | }"#); |
236 | 236 | ||
237 | assert_eq!(desc.name, Some("do_it".into())); | 237 | assert_eq!(desc.name, "do_it".to_string()); |
238 | assert_eq!(desc.params, vec!["&self".to_string(), "x".to_string()]); | 238 | assert_eq!(desc.params, vec!["&self".to_string(), "x".to_string()]); |
239 | assert_eq!(desc.ret_type, None); | 239 | assert_eq!(desc.ret_type, None); |
240 | assert_eq!(param, Some(1)); | 240 | assert_eq!(param, Some(1)); |