aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_editor/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_editor/src')
-rw-r--r--crates/ra_editor/src/lib.rs11
-rw-r--r--crates/ra_editor/src/test_utils.rs5
-rw-r--r--crates/ra_editor/src/typing.rs2
3 files changed, 5 insertions, 13 deletions
diff --git a/crates/ra_editor/src/lib.rs b/crates/ra_editor/src/lib.rs
index c6b116159..ce080ee97 100644
--- a/crates/ra_editor/src/lib.rs
+++ b/crates/ra_editor/src/lib.rs
@@ -1,12 +1,3 @@
1extern crate itertools;
2extern crate join_to_string;
3extern crate ra_syntax;
4extern crate rustc_hash;
5extern crate superslice;
6#[cfg(test)]
7#[macro_use]
8extern crate test_utils as _test_utils;
9
10mod code_actions; 1mod code_actions;
11mod edit; 2mod edit;
12mod extend_selection; 3mod extend_selection;
@@ -154,7 +145,7 @@ pub fn find_node_at_offset<'a, N: AstNode<'a>>(
154#[cfg(test)] 145#[cfg(test)]
155mod tests { 146mod tests {
156 use super::*; 147 use super::*;
157 use crate::test_utils::{add_cursor, assert_eq_dbg, extract_offset}; 148 use crate::test_utils::{add_cursor, assert_eq_dbg, extract_offset, assert_eq_text};
158 149
159 #[test] 150 #[test]
160 fn test_highlighting() { 151 fn test_highlighting() {
diff --git a/crates/ra_editor/src/test_utils.rs b/crates/ra_editor/src/test_utils.rs
index cbeb6433b..f0a4f250a 100644
--- a/crates/ra_editor/src/test_utils.rs
+++ b/crates/ra_editor/src/test_utils.rs
@@ -1,7 +1,8 @@
1use crate::LocalEdit;
2pub use crate::_test_utils::*;
3use ra_syntax::{SourceFileNode, TextRange, TextUnit}; 1use ra_syntax::{SourceFileNode, TextRange, TextUnit};
4 2
3use crate::LocalEdit;
4pub use test_utils::*;
5
5pub fn check_action<F: Fn(&SourceFileNode, TextUnit) -> Option<LocalEdit>>( 6pub fn check_action<F: Fn(&SourceFileNode, TextUnit) -> Option<LocalEdit>>(
6 before: &str, 7 before: &str,
7 after: &str, 8 after: &str,
diff --git a/crates/ra_editor/src/typing.rs b/crates/ra_editor/src/typing.rs
index f894d8392..9703e0371 100644
--- a/crates/ra_editor/src/typing.rs
+++ b/crates/ra_editor/src/typing.rs
@@ -238,7 +238,7 @@ fn compute_ws(left: SyntaxNodeRef, right: SyntaxNodeRef) -> &'static str {
238#[cfg(test)] 238#[cfg(test)]
239mod tests { 239mod tests {
240 use super::*; 240 use super::*;
241 use crate::test_utils::{add_cursor, check_action, extract_offset, extract_range}; 241 use crate::test_utils::{add_cursor, check_action, extract_offset, extract_range, assert_eq_text};
242 242
243 fn check_join_lines(before: &str, after: &str) { 243 fn check_join_lines(before: &str, after: &str) {
244 check_action(before, after, |file, offset| { 244 check_action(before, after, |file, offset| {