diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-15 11:18:56 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-15 11:18:56 +0000 |
commit | f6f2e89e7ac9c4afbda11bade21f902c552fbba2 (patch) | |
tree | 07e0ffe10b57fe55f6586707ae1776d47b77f6e0 /crates/ra_ide_api_light/src/structure.rs | |
parent | e8e82ce032f8678929b015e6f70ac060bb2cf94c (diff) | |
parent | d79a9b17dc4fb132443aa4ec1ca0ab278d2a217c (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/ra_ide_api_light/src/structure.rs')
-rw-r--r-- | crates/ra_ide_api_light/src/structure.rs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/crates/ra_ide_api_light/src/structure.rs b/crates/ra_ide_api_light/src/structure.rs index 8bd57555f..3c6f39e16 100644 --- a/crates/ra_ide_api_light/src/structure.rs +++ b/crates/ra_ide_api_light/src/structure.rs | |||
@@ -87,7 +87,7 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> { | |||
87 | #[cfg(test)] | 87 | #[cfg(test)] |
88 | mod tests { | 88 | mod tests { |
89 | use super::*; | 89 | use super::*; |
90 | use test_utils::assert_eq_dbg; | 90 | use insta::assert_debug_snapshot_matches; |
91 | 91 | ||
92 | #[test] | 92 | #[test] |
93 | fn test_file_structure() { | 93 | fn test_file_structure() { |
@@ -112,18 +112,6 @@ impl fmt::Debug for E {} | |||
112 | "#, | 112 | "#, |
113 | ); | 113 | ); |
114 | let structure = file_structure(&file); | 114 | let structure = file_structure(&file); |
115 | assert_eq_dbg( | 115 | assert_debug_snapshot_matches!("file_structure", structure); |
116 | r#"[StructureNode { parent: None, label: "Foo", navigation_range: [8; 11), node_range: [1; 26), kind: STRUCT_DEF }, | ||
117 | StructureNode { parent: Some(0), label: "x", navigation_range: [18; 19), node_range: [18; 24), kind: NAMED_FIELD_DEF }, | ||
118 | StructureNode { parent: None, label: "m", navigation_range: [32; 33), node_range: [28; 53), kind: MODULE }, | ||
119 | StructureNode { parent: Some(2), label: "bar", navigation_range: [43; 46), node_range: [40; 51), kind: FN_DEF }, | ||
120 | StructureNode { parent: None, label: "E", navigation_range: [60; 61), node_range: [55; 75), kind: ENUM_DEF }, | ||
121 | StructureNode { parent: None, label: "T", navigation_range: [81; 82), node_range: [76; 88), kind: TYPE_DEF }, | ||
122 | StructureNode { parent: None, label: "S", navigation_range: [96; 97), node_range: [89; 108), kind: STATIC_DEF }, | ||
123 | StructureNode { parent: None, label: "C", navigation_range: [115; 116), node_range: [109; 127), kind: CONST_DEF }, | ||
124 | StructureNode { parent: None, label: "impl E", navigation_range: [134; 135), node_range: [129; 138), kind: IMPL_BLOCK }, | ||
125 | StructureNode { parent: None, label: "impl fmt::Debug for E", navigation_range: [160; 161), node_range: [140; 164), kind: IMPL_BLOCK }]"#, | ||
126 | &structure, | ||
127 | ) | ||
128 | } | 116 | } |
129 | } | 117 | } |