From 4ada8265e67cd647ebbbe6f590085e688d4385e7 Mon Sep 17 00:00:00 2001 From: roife Date: Sun, 5 May 2024 23:44:52 +0800 Subject: [PATCH] tests: update test in assist apply_demorgan --- .../ide-assists/src/handlers/apply_demorgan.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/crates/ide-assists/src/handlers/apply_demorgan.rs b/crates/ide-assists/src/handlers/apply_demorgan.rs index 652d463bf7..f178a7e0ce 100644 --- a/crates/ide-assists/src/handlers/apply_demorgan.rs +++ b/crates/ide-assists/src/handlers/apply_demorgan.rs @@ -333,16 +333,14 @@ fn f() { !(S <= S || S < S) } check_assist(apply_demorgan, "fn f() { (x ||$0 x) }", "fn f() { !(!x && !x) }") } - // FIXME : This needs to go. - // // https://github.com/rust-lang/rust-analyzer/issues/10963 - // #[test] - // fn demorgan_doesnt_hang() { - // check_assist( - // apply_demorgan, - // "fn f() { 1 || 3 &&$0 4 || 5 }", - // "fn f() { !(!1 || !3 || !4) || 5 }", - // ) - // } + #[test] + fn demorgan_doesnt_hang() { + check_assist( + apply_demorgan, + "fn f() { 1 || 3 &&$0 4 || 5 }", + "fn f() { 1 || !(!3 || !4) || 5 }", + ) + } #[test] fn demorgan_keep_pars_for_op_precedence() {