From 3f4ad44082abe7256825f6fc692c1455a1eb28bb Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 14 Jun 2021 22:55:05 +0300 Subject: internal: document that we don't #[ignore] tests --- crates/hir_def/src/nameres/collector.rs | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'crates/hir_def/src/nameres/collector.rs') diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs index 6fab58f15..4ae02e576 100644 --- a/crates/hir_def/src/nameres/collector.rs +++ b/crates/hir_def/src/nameres/collector.rs @@ -1992,8 +1992,8 @@ mod tests { collector.def_map } - fn do_resolve(code: &str) -> DefMap { - let (db, _file_id) = TestDB::with_single_file(code); + fn do_resolve(not_ra_fixture: &str) -> DefMap { + let (db, _file_id) = TestDB::with_single_file(not_ra_fixture); let krate = db.test_crate(); let edition = db.crate_graph()[krate].edition; @@ -2013,16 +2013,21 @@ mod tests { ); } - #[ignore] // this test does succeed, but takes quite a while :/ + #[ignore] #[test] fn test_macro_expand_will_stop_2() { + // FIXME: this test does succeed, but takes quite a while: 90 seconds in + // the release mode. That's why the argument is not an ra_fixture -- + // otherwise injection highlighting gets stuck. + // + // We need to find a way to fail this faster. do_resolve( r#" - macro_rules! foo { - ($($ty:ty)*) => { foo!($($ty)* $($ty)*); } - } - foo!(KABOOM); - "#, +macro_rules! foo { + ($($ty:ty)*) => { foo!($($ty)* $($ty)*); } +} +foo!(KABOOM); +"#, ); } } -- cgit v1.2.3