diff options
author | Aleksey Kladov <[email protected]> | 2019-10-26 17:08:13 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-10-26 17:08:13 +0100 |
commit | a5cbd8d5e8aca0d0d8dde175ba13bfa995a753c0 (patch) | |
tree | a3dfa55e7fadcb7e7e8299ce03d9f7beaee4a79b /crates/ra_assists/src/doc_tests | |
parent | 2f7d1f10c1614d9448604da5c105b75c43cc6f2b (diff) |
check style for assist docs
Diffstat (limited to 'crates/ra_assists/src/doc_tests')
-rw-r--r-- | crates/ra_assists/src/doc_tests/generated.rs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/crates/ra_assists/src/doc_tests/generated.rs b/crates/ra_assists/src/doc_tests/generated.rs index 43fa159d7..d390db33c 100644 --- a/crates/ra_assists/src/doc_tests/generated.rs +++ b/crates/ra_assists/src/doc_tests/generated.rs | |||
@@ -203,3 +203,55 @@ fn handle(action: Action) { | |||
203 | "#####, | 203 | "#####, |
204 | ) | 204 | ) |
205 | } | 205 | } |
206 | |||
207 | #[test] | ||
208 | fn doctest_flip_binexpr() { | ||
209 | check( | ||
210 | "flip_binexpr", | ||
211 | r#####" | ||
212 | fn main() { | ||
213 | let _ = 90 +<|> 2; | ||
214 | } | ||
215 | "#####, | ||
216 | r#####" | ||
217 | fn main() { | ||
218 | let _ = 2 + 90; | ||
219 | } | ||
220 | "#####, | ||
221 | ) | ||
222 | } | ||
223 | |||
224 | #[test] | ||
225 | fn doctest_flip_comma() { | ||
226 | check( | ||
227 | "flip_comma", | ||
228 | r#####" | ||
229 | fn main() { | ||
230 | ((1, 2),<|> (3, 4)); | ||
231 | } | ||
232 | "#####, | ||
233 | r#####" | ||
234 | fn main() { | ||
235 | ((3, 4), (1, 2)); | ||
236 | } | ||
237 | "#####, | ||
238 | ) | ||
239 | } | ||
240 | |||
241 | #[test] | ||
242 | fn doctest_inline_local_variable() { | ||
243 | check( | ||
244 | "inline_local_variable", | ||
245 | r#####" | ||
246 | fn main() { | ||
247 | let x<|> = 1 + 2; | ||
248 | x * 4; | ||
249 | } | ||
250 | "#####, | ||
251 | r#####" | ||
252 | fn main() { | ||
253 | (1 + 2) * 4; | ||
254 | } | ||
255 | "#####, | ||
256 | ) | ||
257 | } | ||