From ed7ae78c6fd9e508f6e959c6a164cf8481f6b377 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 17 Aug 2018 19:54:08 +0300 Subject: ServerWorld --- crates/libeditor/tests/test.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'crates/libeditor/tests/test.rs') diff --git a/crates/libeditor/tests/test.rs b/crates/libeditor/tests/test.rs index df4cb65d1..cc4226710 100644 --- a/crates/libeditor/tests/test.rs +++ b/crates/libeditor/tests/test.rs @@ -1,11 +1,8 @@ extern crate libeditor; extern crate libsyntax2; -extern crate itertools; #[macro_use] extern crate assert_eq_text; -use std::fmt; -use itertools::Itertools; use assert_eq_text::{assert_eq_dbg}; use libeditor::{ File, TextUnit, TextRange, ActionResult, CursorPosition, @@ -118,6 +115,11 @@ fn test_add_derive() { "#[derive(<|>)]\nstruct Foo { a: i32, }", |file, off| add_derive(file, off).map(|f| f()), ); + check_action( + "struct Foo { <|> a: i32, }", + "#[derive(<|>)]\nstruct Foo { a: i32, }", + |file, off| add_derive(file, off).map(|f| f()), + ); check_action( "#[derive(Clone)]\nstruct Foo { a: i32<|>, }", "#[derive(Clone<|>)]\nstruct Foo { a: i32, }", -- cgit v1.2.3