From 3cbec3459a394e9066ff9007b35118712ea48821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E8=89=AF=E4=BB=94?= <32487868+cijiugechu@users.noreply.github.com> Date: Mon, 17 Jul 2023 20:55:42 +0800 Subject: [PATCH] test: add tests for boolean related comparison (#563) --- .../tests/closure/fold_constants.rs | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/crates/oxc_minifier/tests/closure/fold_constants.rs b/crates/oxc_minifier/tests/closure/fold_constants.rs index f31a716e1..76f539caa 100644 --- a/crates/oxc_minifier/tests/closure/fold_constants.rs +++ b/crates/oxc_minifier/tests/closure/fold_constants.rs @@ -232,6 +232,45 @@ fn test_null_comparison1() { test_same("x==null"); } +#[test] +fn test_boolean_boolean_comparison() { + test_same("!x==!y"); + test_same("!x