aboutsummaryrefslogtreecommitdiff
path: root/crates/test_utils
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-15 11:18:56 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-15 11:18:56 +0000
commitf6f2e89e7ac9c4afbda11bade21f902c552fbba2 (patch)
tree07e0ffe10b57fe55f6586707ae1776d47b77f6e0 /crates/test_utils
parente8e82ce032f8678929b015e6f70ac060bb2cf94c (diff)
parentd79a9b17dc4fb132443aa4ec1ca0ab278d2a217c (diff)
Merge #546
546: replace `assert_dbg_eq` with Insta r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/test_utils')
-rw-r--r--crates/test_utils/src/lib.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/crates/test_utils/src/lib.rs b/crates/test_utils/src/lib.rs
index 9b1c9c9a0..6489033dd 100644
--- a/crates/test_utils/src/lib.rs
+++ b/crates/test_utils/src/lib.rs
@@ -1,8 +1,6 @@
1use std::fmt;
2use std::fs; 1use std::fs;
3use std::path::{Path, PathBuf}; 2use std::path::{Path, PathBuf};
4 3
5use itertools::Itertools;
6use text_unit::{TextRange, TextUnit}; 4use text_unit::{TextRange, TextUnit};
7use serde_json::Value; 5use serde_json::Value;
8 6
@@ -31,12 +29,6 @@ macro_rules! assert_eq_text {
31 }}; 29 }};
32} 30}
33 31
34pub fn assert_eq_dbg(expected: &str, actual: &impl fmt::Debug) {
35 let actual = format!("{:?}", actual);
36 let expected = expected.lines().map(|l| l.trim()).join(" ");
37 assert_eq!(expected, actual);
38}
39
40pub fn extract_offset(text: &str) -> (TextUnit, String) { 32pub fn extract_offset(text: &str) -> (TextUnit, String) {
41 match try_extract_offset(text) { 33 match try_extract_offset(text) {
42 None => panic!("text should contain cursor marker"), 34 None => panic!("text should contain cursor marker"),