Skip to content

Commit

Permalink
Move tests to fixtures - mangler
Browse files Browse the repository at this point in the history
  • Loading branch information
boopathi committed Nov 9, 2017
1 parent 5a41708 commit b65e927
Show file tree
Hide file tree
Showing 91 changed files with 1,158 additions and 1,310 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function foo() {
var xxx = 1;
if (xxx) {
console.log(xxx);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function foo() {
var a = 1;
if (a) {
console.log(a);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class A {}
class B {}
new A();
new B();
function a() {
class A {}
class B {}
new A();
new B();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class A {}
class B {}
new A();
new B();
function a() {
class a {}
class b {}
new a();
new b();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function foo() {
function bar(baz) {
return function() {
bam();
};
}
function bam() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function foo() {
function a(a) {
return function () {
b();
};
}
function b() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function foo() {
function bar() {
var baz;
if (baz) {
bam();
}
}
function bam() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function foo() {
function a() {
var a;
if (a) {
b();
}
}
function b() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
!function() {
var bar = 1;
bar--;
var bar = 10;
foo(bar);
function foo() {
var foo = 10;
foo++;
var foo = 20;
foo(foo);
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
!function () {
var b = 1;
b--;
var b = 10;
a(b);
function a() {
var a = 10;
a++;
var a = 20;
a(a);
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(function() {
var foo = bar,
foo = baz;
foo;
})();
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(function () {
var a = bar,
a = baz;
a;
})();
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
function foo() {
var x;
x;
x;
{
var x;
x;
x;
function y() {
var x;
x;
x;
{
var x;
x;
x;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
function foo() {
var a;
a;
a;
{
var a;
a;
a;
function b() {
var a;
a;
a;
{
var a;
a;
a;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
!function() {
var foo = 1;
foo++;
var foo = 2;
foo++;
};

(function() {
var x = y;
x = z;
x;
})();
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
!function () {
var a = 1;
a++;
var a = 2;
a++;
};

(function () {
var a = y;
a = z;
a;
})();
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function xoo() {
function foo(zz, xx, yy) {
function bar(zip, zap, zop) {
return function(bar) {
zap();
return function() {
zip();
};
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function xoo() {
function a(a, b, c) {
function d(a, b, c) {
return function (c) {
b();
return function () {
a();
};
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// issue#326
function a() {
let foo, bar, baz;
({ foo, bar, baz } = {});
return { foo, bar, baz };
}
// issue#369
function decodeMessage(message) {
let namespace;
let name;
let value = null;

[, namespace, name, value] = message.split(",") || [];
console.log(name);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// issue#326
function a() {
let a, b, c;
({ foo: a, bar: b, baz: c } = {});
return { foo: a, bar: b, baz: c };
}
// issue#369
function decodeMessage(a) {
let b;
let c;
let d = null;

[, b, c, d] = a.split(",") || [];
console.log(c);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function foo() {
var inScopeOuter = 1;
(function() {
var inScopeInner = 2;
eval("...");
(function() {
var outOfScope = 1;
})();
})();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function foo() {
var a = 1;
(function () {
var a = 2;
eval("...");
(function () {
var a = 1;
})();
})();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"eval": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function foo() {
var inScopeOuter = 1;
(function() {
var inScopeInner = 2;
eval("inScopeInner + inScopeOuter");
(function() {
var outOfScope = 1;
})();
})();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function foo() {
var inScopeOuter = 1;
(function () {
var inScopeInner = 2;
eval("inScopeInner + inScopeOuter");
(function () {
var a = 1;
})();
})();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function foo() {
function xx(bar, baz) {
if (1) {
yy(bar, baz);
}
}
function yy() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function foo() {
function a(a, c) {
if (1) {
b(a, c);
}
}
function b() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function foo(xxx) {
if (xxx) {
console.log(xxx);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function foo(a) {
if (a) {
console.log(a);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function e() {
function foo() {
b = bar();
}
function bar() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function e() {
function a() {
b = c();
}
function c() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class A {}
class B extends A {}
(function() {
class C {
constructor() {
new A();
new B();
C;
}
}
})();
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class A {}
class B extends A {}
(function () {
class a {
constructor() {
new A();
new B();
a;
}
}
})();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var Foo = 1;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var Foo = 1;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(function() {
function foo() {
{
var baz = true;

{
bar();
}
}
}

function bar() {}
})();
Loading

0 comments on commit b65e927

Please sign in to comment.