accept baselines

This commit is contained in:
Vladimir Matveev
2016-04-04 13:52:56 -07:00
parent 5048aef11b
commit 8e1e2d70b5
42 changed files with 98 additions and 99 deletions

View File

@@ -6,6 +6,6 @@ var square = (x: number) => x * x;
//// [arrowFunctionMissingCurlyWithSemicolon.js]
// Should error at semicolon.
var f = ;
var f = function () { return ; };
var b = 1 * 2 * 3 * 4;
var square = function (x) { return x * x; };

View File

@@ -88,25 +88,25 @@ var missingCurliesWithArrow;
})(withStatement || (withStatement = {}));
var withoutStatement;
(function (withoutStatement) {
var a = ;
var a = function () { return ; };
})(withoutStatement || (withoutStatement = {}));
;
var b = ;
var b = function () { return ; };
})(missingCurliesWithArrow || (missingCurliesWithArrow = {}));
var c = ;
var c = function (x) { return ; };
;
var d = ;
var d = function (x, y) { return ; };
;
var e = ;
var e = function (x, y) { return ; };
;
var f = ;
var f = function () { return ; };
var ce_nEst_pas_une_arrow_function;
(function (ce_nEst_pas_une_arrow_function) {
var a = ();
var b = ;
var b = function () { return ; };
var c = (x);
var d = ;
var e = ;
var d = function (x, y) { return ; };
var e = function (x, y) { return ; };
})(ce_nEst_pas_une_arrow_function || (ce_nEst_pas_une_arrow_function = {}));
var okay;
(function (okay) {

View File

@@ -23,15 +23,15 @@ let c1 = Foo["C"].toString();
//// [constEnumToStringNoComments.js]
var x0 = 100 .toString();
var x1 = 100 .toString();
var x0 = 100..toString();
var x1 = 100..toString();
var y0 = 0.5.toString();
var y1 = 0.5.toString();
var z0 = 2 .toString();
var z1 = 2 .toString();
var a0 = -1 .toString();
var a1 = -1 .toString();
var z0 = 2..toString();
var z1 = 2..toString();
var a0 = -1..toString();
var a1 = -1..toString();
var b0 = -1.5.toString();
var b1 = -1.5.toString();
var c0 = -1 .toString();
var c1 = -1 .toString();
var c0 = -1..toString();
var c1 = -1..toString();

View File

@@ -14,7 +14,7 @@ function foo() {
//// [continueInLoopsWithCapturedBlockScopedBindings1.js]
function foo() {
var _loop_1 = function(i) {
var _loop_1 = function (i) {
if (i === 0) {
return "continue";
}

View File

@@ -17,14 +17,14 @@ function baz4({} = { x: 10 }) { }
// the similar binding pattern users' have written
function baz(_a) { }
function baz1(_a) {
var _a = [1, 2, 3];
_a = [1, 2, 3];
}
function baz2(_a) {
var _b = (_a === void 0 ? [[1, 2, 3]] : _a)[0];
}
function baz3(_a) { }
function baz4(_a) {
var _a = { x: 10 };
_a = { x: 10 };
}

View File

@@ -20,21 +20,18 @@ class C3 {
var C1 = (function () {
function C1(_a) {
var x = _a[0], y = _a[1], z = _a[2];
this.[x, y, z] = [x, y, z];
}
return C1;
}());
var C2 = (function () {
function C2(_a) {
var x = _a[0], y = _a[1], z = _a[2];
this.[x, y, z] = [x, y, z];
}
return C2;
}());
var C3 = (function () {
function C3(_a) {
var x = _a.x, y = _a.y, z = _a.z;
this.{ x, y, z } = { x, y, z };
}
return C3;
}());

View File

@@ -12,8 +12,8 @@ var k = function (_a) {
};
var a;
function f(_a, _b, _c) {
var _a = a;
var _b = a;
_a = a;
_b = a;
var _d = (_c === void 0 ? a : _c).p, _e = _d === void 0 ? a : _d;
}

View File

@@ -23,8 +23,10 @@ var MyClass = (function () {
return MyClass;
}());
__decorate([
decorator,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
decorator,
__metadata("design:typeinfo", {
type: function () { return Function; },
paramTypes: function () { return []; },
returnType: function () { return void 0; }
})
], MyClass.prototype, "doSomething", null);

View File

@@ -9,12 +9,12 @@ import {F} from 'f1';
console.log(A + B + C + D + E + F)
//// [deduplicateImportsInSystem.js]
System.register(["f1", "f2", "f3"], function(exports_1, context_1) {
System.register(["f1", "f2", "f3"], function (exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var f1_1, f2_1, f3_1, f2_2, f2_3, f1_2;
return {
setters:[
setters: [
function (f1_1_1) {
f1_1 = f1_1_1;
f1_2 = f1_1_1;
@@ -26,9 +26,10 @@ System.register(["f1", "f2", "f3"], function(exports_1, context_1) {
},
function (f3_1_1) {
f3_1 = f3_1_1;
}],
execute: function() {
}
],
execute: function () {
console.log(f1_1.A + f2_1.B + f3_1.C + f2_2.D + f2_3.E + f1_2.F);
}
}
};
});

View File

@@ -6,14 +6,14 @@ export let { toString } = 1;
//// [destructuringInVariableDeclarations5.js]
(function (factory) {
(function (dependencies, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
var v = factory(require, exports); if (v !== undefined) module.exports = v;
}
else if (typeof define === 'function' && define.amd) {
define(["require", "exports"], factory);
define(dependencies, factory);
}
})(function (require, exports) {
})(["require", "exports"], function (require, exports) {
"use strict";
exports.toString = (1).toString;
{

View File

@@ -7,14 +7,14 @@ export {};
//// [destructuringInVariableDeclarations6.js]
(function (factory) {
(function (dependencies, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
var v = factory(require, exports); if (v !== undefined) module.exports = v;
}
else if (typeof define === 'function' && define.amd) {
define(["require", "exports"], factory);
define(dependencies, factory);
}
})(function (require, exports) {
})(["require", "exports"], function (require, exports) {
"use strict";
let { toString } = 1;
{

View File

@@ -6,17 +6,17 @@ export let { toString } = 1;
//// [destructuringInVariableDeclarations7.js]
System.register([], function(exports_1, context_1) {
System.register([], function (exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var toString;
return {
setters:[],
execute: function() {
setters: [],
execute: function () {
exports_1("toString", toString = (1).toString);
{
let { toFixed } = 1;
}
}
}
};
});

View File

@@ -7,17 +7,17 @@ export {};
//// [destructuringInVariableDeclarations8.js]
System.register([], function(exports_1, context_1) {
System.register([], function (exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var toString;
return {
setters:[],
execute: function() {
({ toString } = 1);
setters: [],
execute: function () {
toString = (1).toString;
{
let { toFixed } = 1;
}
}
}
};
});

View File

@@ -8,17 +8,17 @@ export function bar() {
}
//// [dottedNamesInSystem.js]
System.register([], function(exports_1, context_1) {
System.register([], function (exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var A;
function bar() {
return A.B.C.foo();
}
var A;
exports_1("bar", bar);
return {
setters:[],
execute: function() {
setters: [],
execute: function () {
(function (A) {
var B;
(function (B) {
@@ -28,8 +28,8 @@ System.register([], function(exports_1, context_1) {
C.foo = foo;
})(C = B.C || (B.C = {}));
})(B = A.B || (A.B = {}));
})(A = A || (A = {}));
})(A || (A = {}));
exports_1("A", A);
}
}
};
});

View File

@@ -33,45 +33,45 @@ for (let x; ;) {
//// [downlevelLetConst18.js]
'use strict';
var _loop_1 = function(x) {
var _loop_1 = function (x) {
function foo() { x; }
;
};
for (var x = void 0;;) {
_loop_1(x);
}
var _loop_2 = function(x) {
var _loop_2 = function (x) {
function foo1() { x; }
;
};
for (var x = void 0;;) {
_loop_2(x);
}
var _loop_3 = function(x) {
var _loop_3 = function (x) {
(function () { x; })();
};
for (var x = void 0;;) {
_loop_3(x);
}
var _loop_4 = function(x) {
var _loop_4 = function (x) {
(function () { x; })();
};
for (var x = 1;;) {
_loop_4(x);
}
var _loop_5 = function(x) {
var _loop_5 = function (x) {
({ foo: function () { x; } });
};
for (var x = void 0;;) {
_loop_5(x);
}
var _loop_6 = function(x) {
var _loop_6 = function (x) {
({ get foo() { return x; } });
};
for (var x = void 0;;) {
_loop_6(x);
}
var _loop_7 = function(x) {
var _loop_7 = function (x) {
({ set foo(v) { x; } });
};
for (var x = void 0;;) {

View File

@@ -6,5 +6,5 @@ enum E {
//// [enumWithQuotedElementName1.js]
var E;
(function (E) {
E[E['fo"o'] = 0] = 'fo"o';
E[E["fo\"o"] = 0] = "fo\"o";
})(E || (E = {}));

View File

@@ -7,5 +7,5 @@ enum E {
//// [enumWithUnicodeEscape1.js]
var E;
(function (E) {
E[E['gold \u2730'] = 0] = 'gold \u2730';
E[E["gold \u2730"] = 0] = "gold \u2730";
})(E || (E = {}));

View File

@@ -15,13 +15,13 @@ export default class A
//// [es5-system.js]
System.register([], function(exports_1, context_1) {
System.register([], function (exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var A;
return {
setters:[],
execute: function() {
setters: [],
execute: function () {
A = (function () {
function A() {
}
@@ -32,5 +32,5 @@ System.register([], function(exports_1, context_1) {
}());
exports_1("default", A);
}
}
};
});

View File

@@ -15,14 +15,14 @@ export class A
//// [es5-umd2.js]
(function (factory) {
(function (dependencies, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
var v = factory(require, exports); if (v !== undefined) module.exports = v;
}
else if (typeof define === 'function' && define.amd) {
define(["require", "exports"], factory);
define(dependencies, factory);
}
})(function (require, exports) {
})(["require", "exports"], function (require, exports) {
"use strict";
var A = (function () {
function A() {

View File

@@ -15,14 +15,14 @@ export default class A
//// [es5-umd3.js]
(function (factory) {
(function (dependencies, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
var v = factory(require, exports); if (v !== undefined) module.exports = v;
}
else if (typeof define === 'function' && define.amd) {
define(["require", "exports"], factory);
define(dependencies, factory);
}
})(function (require, exports) {
})(["require", "exports"], function (require, exports) {
"use strict";
var A = (function () {
function A() {

View File

@@ -17,14 +17,14 @@ export = A;
//// [es5-umd4.js]
(function (factory) {
(function (dependencies, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
var v = factory(require, exports); if (v !== undefined) module.exports = v;
}
else if (typeof define === 'function' && define.amd) {
define(["require", "exports"], factory);
define(dependencies, factory);
}
})(function (require, exports) {
})(["require", "exports"], function (require, exports) {
"use strict";
var A = (function () {
function A() {

View File

@@ -14,14 +14,14 @@ export class A
}
//// [es6-umd2.js]
(function (factory) {
(function (dependencies, factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
var v = factory(require, exports); if (v !== undefined) module.exports = v;
}
else if (typeof define === 'function' && define.amd) {
define(["require", "exports"], factory);
define(dependencies, factory);
}
})(function (require, exports) {
})(["require", "exports"], function (require, exports) {
"use strict";
class A {
constructor() {

View File

@@ -10,7 +10,7 @@ var x8: typeof /123/;
//// [invalidTypeOfTarget.js]
var x1 = {};
var x2 = ;
var x2 = function () { return ; };
var x3 = 1;
var x4 = '';
var x5;

View File

@@ -4,5 +4,5 @@ for (var a = 1 of X) {
//// [parserES5ForOfStatement4.js]
for (var _i = 0, X_1 = X; _i < X_1.length; _i++) {
var a = 1 = X_1[_i];
var a = X_1[_i];
}

View File

@@ -4,5 +4,5 @@ for (var a = 1, b = 2 of X) {
//// [parserES5ForOfStatement6.js]
for (var _i = 0, X_1 = X; _i < X_1.length; _i++) {
var a = 1 = X_1[_i];
var a = X_1[_i];
}

View File

@@ -4,5 +4,5 @@ for (var a: number = 1, b: string = "" of X) {
//// [parserES5ForOfStatement7.js]
for (var _i = 0, X_1 = X; _i < X_1.length; _i++) {
var a = 1 = X_1[_i];
var a = X_1[_i];
}

View File

@@ -2,3 +2,4 @@
function =>
//// [parserEqualsGreaterThanAfterFunction1.js]
function () { }

View File

@@ -2,4 +2,5 @@
function f() => 4;
//// [parserErrantEqualsGreaterThanAfterFunction1.js]
function f() { }
4;

View File

@@ -2,4 +2,5 @@
function f(p: A) => p;
//// [parserErrantEqualsGreaterThanAfterFunction2.js]
function f(p) { }
p;

View File

@@ -10,7 +10,8 @@ class C {
var C = (function () {
function C() {
}
C.prototype.a = function () { };
C.prototype.a = function () {
};
C.prototype.b = function () {
};
return C;

View File

@@ -2,4 +2,4 @@
(a:number => { }
//// [parserErrorRecovery_ParameterList5.js]
();
(function (a, _a) { return ; });

View File

@@ -7,7 +7,7 @@ class Foo {
var Foo = (function () {
function Foo() {
}
Foo.prototype.banana = ;
Foo.prototype.banana = function (x) { };
return Foo;
}());
break ;

View File

@@ -3,5 +3,5 @@ for (var in X) {
}
//// [parserForInStatement2.js]
for ( in X) {
for (var in X) {
}

View File

@@ -3,5 +3,5 @@ for (var of X) {
}
//// [parserForOfStatement2.js]
for ( of X) {
for (var of X) {
}

View File

@@ -2,4 +2,4 @@
for (var of of) { }
//// [parserForOfStatement21.js]
for ( of of) { }
for (var of of) { }

View File

@@ -8,8 +8,7 @@ var C = (function () {
function C() {
}
Object.defineProperty(C.prototype, "Foo", {
get: function () { }
exports.Foo = Foo;,
get: function () { },
enumerable: true,
configurable: true
});

View File

@@ -7,7 +7,6 @@ class C {
var C = (function () {
function C() {
}
C.prototype.Foo = function () { }
exports.Foo = Foo;;
C.prototype.Foo = function () { };
return C;
}());

View File

@@ -10,6 +10,5 @@ export function foo() {
function foo() {
function bar() {
}
exports.bar = bar;
}
exports.foo = foo;

View File

@@ -9,5 +9,4 @@
{
function bar() {
}
exports.bar = bar;
}

View File

@@ -12,6 +12,7 @@ var x =
foo();
Bar;
{ }
function Foo() { }
{ }
4 + ;
5;

View File

@@ -6,7 +6,6 @@ export type CallbackArray<T extends callback> = () => T;
//// [typeAliasDeclarationEmit.js]
define(["require", "exports"], function (require, exports) {
"use strict";
});

View File

@@ -4,7 +4,6 @@ export type A<a> = { value: a };
//// [typeAliasDeclarationEmit2.js]
define(["require", "exports"], function (require, exports) {
"use strict";
});