aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/doc_tests
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-10-26 17:08:13 +0100
committerAleksey Kladov <[email protected]>2019-10-26 17:08:13 +0100
commita5cbd8d5e8aca0d0d8dde175ba13bfa995a753c0 (patch)
treea3dfa55e7fadcb7e7e8299ce03d9f7beaee4a79b /crates/ra_assists/src/doc_tests
parent2f7d1f10c1614d9448604da5c105b75c43cc6f2b (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.rs52
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]
208fn doctest_flip_binexpr() {
209 check(
210 "flip_binexpr",
211 r#####"
212fn main() {
213 let _ = 90 +<|> 2;
214}
215"#####,
216 r#####"
217fn main() {
218 let _ = 2 + 90;
219}
220"#####,
221 )
222}
223
224#[test]
225fn doctest_flip_comma() {
226 check(
227 "flip_comma",
228 r#####"
229fn main() {
230 ((1, 2),<|> (3, 4));
231}
232"#####,
233 r#####"
234fn main() {
235 ((3, 4), (1, 2));
236}
237"#####,
238 )
239}
240
241#[test]
242fn doctest_inline_local_variable() {
243 check(
244 "inline_local_variable",
245 r#####"
246fn main() {
247 let x<|> = 1 + 2;
248 x * 4;
249}
250"#####,
251 r#####"
252fn main() {
253 (1 + 2) * 4;
254}
255"#####,
256 )
257}