diff options
Diffstat (limited to 'crates/ra_hir_ty/src/tests.rs')
-rw-r--r-- | crates/ra_hir_ty/src/tests.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/tests.rs b/crates/ra_hir_ty/src/tests.rs index c972bf845..59a21092e 100644 --- a/crates/ra_hir_ty/src/tests.rs +++ b/crates/ra_hir_ty/src/tests.rs | |||
@@ -10,6 +10,7 @@ mod display_source_code; | |||
10 | 10 | ||
11 | use std::sync::Arc; | 11 | use std::sync::Arc; |
12 | 12 | ||
13 | use expect::Expect; | ||
13 | use hir_def::{ | 14 | use hir_def::{ |
14 | body::{BodySourceMap, SyntheticSyntax}, | 15 | body::{BodySourceMap, SyntheticSyntax}, |
15 | child_by_source::ChildBySource, | 16 | child_by_source::ChildBySource, |
@@ -344,3 +345,15 @@ fn typing_whitespace_inside_a_function_should_not_invalidate_types() { | |||
344 | assert!(!format!("{:?}", events).contains("infer"), "{:#?}", events) | 345 | assert!(!format!("{:?}", events).contains("infer"), "{:#?}", events) |
345 | } | 346 | } |
346 | } | 347 | } |
348 | |||
349 | fn check_infer(ra_fixture: &str, expect: Expect) { | ||
350 | let mut actual = infer(ra_fixture); | ||
351 | actual.push('\n'); | ||
352 | expect.assert_eq(&actual); | ||
353 | } | ||
354 | |||
355 | fn check_infer_with_mismatches(ra_fixture: &str, expect: Expect) { | ||
356 | let mut actual = infer_with_mismatches(ra_fixture, true); | ||
357 | actual.push('\n'); | ||
358 | expect.assert_eq(&actual); | ||
359 | } | ||