aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-04-22 11:05:01 +0100
committerAleksey Kladov <[email protected]>2019-04-22 11:05:01 +0100
commitb73a978b95810b188090a37e002a22403a9067bd (patch)
tree7e3f0548676d6c281ded23505d66f69fe8123c93 /crates/ra_assists
parent268e739c94d2e9edbb45374dfcc252b1648d3181 (diff)
drop useless test
Diffstat (limited to 'crates/ra_assists')
-rw-r--r--crates/ra_assists/src/ast_editor.rs28
1 files changed, 0 insertions, 28 deletions
diff --git a/crates/ra_assists/src/ast_editor.rs b/crates/ra_assists/src/ast_editor.rs
index 283b280b6..6854294ae 100644
--- a/crates/ra_assists/src/ast_editor.rs
+++ b/crates/ra_assists/src/ast_editor.rs
@@ -331,31 +331,3 @@ mod tokens {
331 } 331 }
332 332
333} 333}
334
335#[cfg(test)]
336mod tests {
337 use super::*;
338
339 use ra_syntax::SourceFile;
340
341 #[test]
342 fn structure_editing() {
343 let file = SourceFile::parse(
344 "\
345fn foo() {
346 let s = S {
347 original: 92,
348 }
349}
350",
351 );
352 let field_list = file.syntax().descendants().find_map(ast::NamedFieldList::cast).unwrap();
353 let mut editor = AstEditor::new(field_list);
354
355 let field = AstBuilder::<ast::NamedField>::from_text("first_inserted: 1");
356 editor.append_field(&field);
357 let field = AstBuilder::<ast::NamedField>::from_text("second_inserted: 2");
358 editor.append_field(&field);
359 eprintln!("{}", editor.ast().syntax());
360 }
361}