aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
authorPhil Ellison <[email protected]>2019-07-28 11:57:56 +0100
committerPhil Ellison <[email protected]>2019-07-28 11:57:56 +0100
commita72331f223a120101f6edac51962ac7b2aa48cde (patch)
treef8475f9c1c7ca625bb50a70edfe1146d883bfeae /crates/ra_ide_api/src
parent8f71614bdd1e3f07019b1629235a68417adf7e27 (diff)
Inline snapshots for all tests in runnables.rs
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/runnables.rs72
-rw-r--r--crates/ra_ide_api/src/snapshots/tests__runnables.snap24
-rw-r--r--crates/ra_ide_api/src/snapshots/tests__runnables_module.snap20
-rw-r--r--crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap20
-rw-r--r--crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap20
5 files changed, 68 insertions, 88 deletions
diff --git a/crates/ra_ide_api/src/runnables.rs b/crates/ra_ide_api/src/runnables.rs
index 07412a9ef..7a3a574ad 100644
--- a/crates/ra_ide_api/src/runnables.rs
+++ b/crates/ra_ide_api/src/runnables.rs
@@ -92,7 +92,26 @@ mod tests {
92 "#, 92 "#,
93 ); 93 );
94 let runnables = analysis.runnables(pos.file_id).unwrap(); 94 let runnables = analysis.runnables(pos.file_id).unwrap();
95 assert_debug_snapshot_matches!("runnables", &runnables) 95 assert_debug_snapshot_matches!(&runnables,
96@r#"[
97 Runnable {
98 range: [1; 21),
99 kind: Bin,
100 },
101 Runnable {
102 range: [22; 46),
103 kind: Test {
104 name: "test_foo",
105 },
106 },
107 Runnable {
108 range: [47; 81),
109 kind: Test {
110 name: "test_foo",
111 },
112 },
113]"#
114 );
96 } 115 }
97 116
98 #[test] 117 #[test]
@@ -108,7 +127,22 @@ mod tests {
108 "#, 127 "#,
109 ); 128 );
110 let runnables = analysis.runnables(pos.file_id).unwrap(); 129 let runnables = analysis.runnables(pos.file_id).unwrap();
111 assert_debug_snapshot_matches!("runnables_module", &runnables) 130 assert_debug_snapshot_matches!(&runnables,
131@r#"[
132 Runnable {
133 range: [1; 59),
134 kind: TestMod {
135 path: "test_mod",
136 },
137 },
138 Runnable {
139 range: [28; 57),
140 kind: Test {
141 name: "test_foo1",
142 },
143 },
144]"#
145 );
112 } 146 }
113 147
114 #[test] 148 #[test]
@@ -126,7 +160,22 @@ mod tests {
126 "#, 160 "#,
127 ); 161 );
128 let runnables = analysis.runnables(pos.file_id).unwrap(); 162 let runnables = analysis.runnables(pos.file_id).unwrap();
129 assert_debug_snapshot_matches!("runnables_one_depth_layer_module", &runnables) 163 assert_debug_snapshot_matches!(&runnables,
164@r#"[
165 Runnable {
166 range: [23; 85),
167 kind: TestMod {
168 path: "foo::test_mod",
169 },
170 },
171 Runnable {
172 range: [46; 79),
173 kind: Test {
174 name: "test_foo1",
175 },
176 },
177]"#
178 );
130 } 179 }
131 180
132 #[test] 181 #[test]
@@ -146,7 +195,22 @@ mod tests {
146 "#, 195 "#,
147 ); 196 );
148 let runnables = analysis.runnables(pos.file_id).unwrap(); 197 let runnables = analysis.runnables(pos.file_id).unwrap();
149 assert_debug_snapshot_matches!("runnables_multiple_depth_module", &runnables) 198 assert_debug_snapshot_matches!(&runnables,
199@r#"[
200 Runnable {
201 range: [41; 115),
202 kind: TestMod {
203 path: "foo::bar::test_mod",
204 },
205 },
206 Runnable {
207 range: [68; 105),
208 kind: Test {
209 name: "test_foo1",
210 },
211 },
212]"#
213 );
150 } 214 }
151 215
152 #[test] 216 #[test]
diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables.snap b/crates/ra_ide_api/src/snapshots/tests__runnables.snap
deleted file mode 100644
index de2fadd7f..000000000
--- a/crates/ra_ide_api/src/snapshots/tests__runnables.snap
+++ /dev/null
@@ -1,24 +0,0 @@
1---
2created: "2019-05-23T22:23:35.217100106Z"
3creator: [email protected]
4source: crates/ra_ide_api/src/runnables.rs
5expression: "&runnables"
6---
7[
8 Runnable {
9 range: [1; 21),
10 kind: Bin,
11 },
12 Runnable {
13 range: [22; 46),
14 kind: Test {
15 name: "test_foo",
16 },
17 },
18 Runnable {
19 range: [47; 81),
20 kind: Test {
21 name: "test_foo",
22 },
23 },
24]
diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap b/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap
deleted file mode 100644
index 23993a97f..000000000
--- a/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap
+++ /dev/null
@@ -1,20 +0,0 @@
1---
2created: "2019-05-23T22:23:35.219258850Z"
3creator: [email protected]
4source: crates/ra_ide_api/src/runnables.rs
5expression: "&runnables"
6---
7[
8 Runnable {
9 range: [1; 59),
10 kind: TestMod {
11 path: "test_mod",
12 },
13 },
14 Runnable {
15 range: [28; 57),
16 kind: Test {
17 name: "test_foo1",
18 },
19 },
20]
diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap b/crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap
deleted file mode 100644
index c516a61df..000000000
--- a/crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap
+++ /dev/null
@@ -1,20 +0,0 @@
1---
2created: "2019-05-23T22:23:35.219671663Z"
3creator: [email protected]
4source: crates/ra_ide_api/src/runnables.rs
5expression: "&runnables"
6---
7[
8 Runnable {
9 range: [41; 115),
10 kind: TestMod {
11 path: "foo::bar::test_mod",
12 },
13 },
14 Runnable {
15 range: [68; 105),
16 kind: Test {
17 name: "test_foo1",
18 },
19 },
20]
diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap b/crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap
deleted file mode 100644
index b02e6707e..000000000
--- a/crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap
+++ /dev/null
@@ -1,20 +0,0 @@
1---
2created: "2019-05-23T22:23:35.224315047Z"
3creator: [email protected]
4source: crates/ra_ide_api/src/runnables.rs
5expression: "&runnables"
6---
7[
8 Runnable {
9 range: [23; 85),
10 kind: TestMod {
11 path: "foo::test_mod",
12 },
13 },
14 Runnable {
15 range: [46; 79),
16 kind: Test {
17 name: "test_foo1",
18 },
19 },
20]