aboutsummaryrefslogtreecommitdiff
path: root/test/compress/issue-751.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/issue-751.js')
-rw-r--r--test/compress/issue-751.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/compress/issue-751.js b/test/compress/issue-751.js
new file mode 100644
index 00000000..829b7ca5
--- /dev/null
+++ b/test/compress/issue-751.js
@@ -0,0 +1,29 @@
+negate_booleans_1: {
+ options = {
+ comparisons: true
+ };
+ input: {
+ var a = !a || !b || !c || !d || !e || !f;
+ }
+ expect: {
+ var a = !(a && b && c && d && e && f);
+ }
+}
+
+negate_booleans_2: {
+ options = {
+ comparisons: true
+ };
+ input: {
+ var match = !x && // should not touch this one
+ (!z || c) &&
+ (!k || d) &&
+ the_stuff();
+ }
+ expect: {
+ var match = !x &&
+ (!z || c) &&
+ (!k || d) &&
+ the_stuff();
+ }
+}