test(es/minifier): Organize terser tests (#6247)

This commit is contained in:
Donny/강동윤 2022-10-25 14:12:30 +09:00 committed by GitHub
parent cb33feec6e
commit 01edb4fff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 23 deletions

View File

@ -21,7 +21,6 @@ collapse_vars/chained_1/input.js
collapse_vars/chained_2/input.js
collapse_vars/chained_3/input.js
collapse_vars/collapse_vars_arguments/input.js
collapse_vars/collapse_vars_assignment/input.js
collapse_vars/collapse_vars_constants/input.js
collapse_vars/collapse_vars_do_while/input.js
collapse_vars/collapse_vars_do_while_drop_assign/input.js
@ -34,7 +33,6 @@ collapse_vars/collapse_vars_short_circuit/input.js
collapse_vars/collapse_vars_short_circuited_conditions/input.js
collapse_vars/collapse_vars_side_effects_1/input.js
collapse_vars/collapse_vars_switch/input.js
collapse_vars/collapse_vars_unary/input.js
collapse_vars/cond_branch_1/input.js
collapse_vars/cond_branch_2/input.js
collapse_vars/double_def_1/input.js
@ -72,8 +70,6 @@ collapse_vars/switch_case_1/input.js
collapse_vars/toplevel_single_reference/input.js
collapse_vars/undeclared/input.js
collapse_vars/unused_orig/input.js
collapse_vars/var_defs/input.js
collapse_vars/var_side_effects_2/input.js
conditionals/equality_conditionals_false/input.js
conditionals/ifs_5/input.js
conditionals/ifs_6/input.js

View File

@ -146,6 +146,7 @@ collapse_vars/collapse_rhs_undefined/input.js
collapse_vars/collapse_rhs_var/input.js
collapse_vars/collapse_rhs_vardef/input.js
collapse_vars/collapse_vars_array/input.js
collapse_vars/collapse_vars_assignment/input.js
collapse_vars/collapse_vars_closures/input.js
collapse_vars/collapse_vars_eval_and_with/input.js
collapse_vars/collapse_vars_issue_721/input.js
@ -157,6 +158,7 @@ collapse_vars/collapse_vars_seq/input.js
collapse_vars/collapse_vars_side_effects_2/input.js
collapse_vars/collapse_vars_throw/input.js
collapse_vars/collapse_vars_try/input.js
collapse_vars/collapse_vars_unary/input.js
collapse_vars/collapse_vars_unary_2/input.js
collapse_vars/collapse_vars_while/input.js
collapse_vars/compound_assignment/input.js
@ -246,7 +248,9 @@ collapse_vars/side_effects_property/input.js
collapse_vars/switch_case_2/input.js
collapse_vars/switch_case_3/input.js
collapse_vars/unsafe_builtin/input.js
collapse_vars/var_defs/input.js
collapse_vars/var_side_effects_1/input.js
collapse_vars/var_side_effects_2/input.js
collapse_vars/var_side_effects_3/input.js
comments/comment_moved_between_return_and_value/input.js
comments/preserve_comments_by_default/input.js

View File

@ -2,27 +2,25 @@ function log(x) {
return console.log(x), x;
}
function f0(c) {
var a = 3 / c;
return (a = a);
return 3 / c;
}
function f1(c) {
return 1 - 3 / c;
}
function f2(c) {
return log((c = 3 / c - 7));
return log(c = 3 / c - 7);
}
function f3(c) {
return log((c |= 3 / c - 7));
var a = 3 / c;
return log(c |= a - 7);
}
function f4(c) {
var b = 2;
return log((b += 3 / c));
return log(2 + 3 / c);
}
function f5(c) {
var b = 2;
return log((b += 3 / c));
return log(2 + 3 / c);
}
function f6(c) {
var b = g();
return log((b += 3 / c));
return log(b += 3 / c);
}

View File

@ -1,6 +1,5 @@
function f0(o, p) {
var x = o[p];
return delete x;
return o[p], !0;
}
function f1(n) {
return n > +!!n;

View File

@ -1,7 +1,5 @@
var f1 = function (x, y) {
var r = x + y,
a = r * r - r,
b = 7;
console.log(a + b);
var f1 = function(x, y) {
var r = x + y;
console.log(r * r - r + 7);
};
f1("1", 0);

View File

@ -1,6 +1,7 @@
var print = console.log.bind(console);
function foo(x) {
var twice = 2 * x.y;
print("Foo:", twice);
print("Foo:", 2 * x.y);
}
foo({ y: 10 });
foo({
y: 10
});