diff options
Diffstat (limited to 'crates/libeditor/tests/test.rs')
-rw-r--r-- | crates/libeditor/tests/test.rs | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/crates/libeditor/tests/test.rs b/crates/libeditor/tests/test.rs index 20de2f240..ecdc149c7 100644 --- a/crates/libeditor/tests/test.rs +++ b/crates/libeditor/tests/test.rs | |||
@@ -256,25 +256,23 @@ struct Foo { f: u32 } | |||
256 | "); | 256 | "); |
257 | } | 257 | } |
258 | 258 | ||
259 | // #[test] | 259 | #[test] |
260 | // fn test_completion() { | 260 | fn test_completion() { |
261 | // fn do_check(code: &str, expected_completions: &str) { | 261 | fn do_check(code: &str, expected_completions: &str) { |
262 | // let (off, code) = extract_offset(&code); | 262 | let (off, code) = extract_offset(&code); |
263 | // let file = file(&code); | 263 | let file = file(&code); |
264 | // let completions = scope_completion(&file, off).unwrap(); | 264 | let completions = scope_completion(&file, off).unwrap(); |
265 | // assert_eq_dbg(expected_completions, &completions); | 265 | assert_eq_dbg(expected_completions, &completions); |
266 | // } | 266 | } |
267 | 267 | ||
268 | // do_check(r" | 268 | do_check(r" |
269 | // fn foo(foo: i32) { | 269 | fn quux(x: i32) { |
270 | // let bar = 92; | 270 | let y = 92; |
271 | // 1 + <|> | 271 | 1 + <|> |
272 | // } | 272 | } |
273 | // ", r#" | 273 | ", r#"[CompletionItem { name: "y" }, |
274 | // CompletionItem { name: "bar" }, | 274 | CompletionItem { name: "x" }]"#); |
275 | // CompletionItem { name: "foo" }, | 275 | } |
276 | // "#); | ||
277 | // } | ||
278 | 276 | ||
279 | fn file(text: &str) -> File { | 277 | fn file(text: &str) -> File { |
280 | File::parse(text) | 278 | File::parse(text) |