Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Baselining smaller changes in transformation-based emit #7814

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/baselines/reference/exportEqualsUmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
export = { ["hi"]: "there" };

//// [exportEqualsUmd.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";
return (_a = {}, _a["hi"] = "there", _a);
var _a;
Expand Down
1 change: 0 additions & 1 deletion tests/baselines/reference/externModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ module;
}
return XDate;
}());
exports.XDate = XDate;
}
var d = new XDate();
d.getDay();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
}

//// [externalModuleWithoutCompilerFlag1.js]
"use strict";
3 changes: 2 additions & 1 deletion tests/baselines/reference/functionExpressionInWithBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ function x() {
function x() {
with ({}) {
function f() {
(function () { return this; });
var _this = this;
(function () { return _this; });
}
}
}
1 change: 0 additions & 1 deletion tests/baselines/reference/genericArrayExtenstions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ concat(...items: T[]): T[];


//// [genericArrayExtenstions.js]
"use strict";
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ export declare module TypeScript {

//// [genericRecursiveImplicitConstructorErrors1.js]
define(["require", "exports"], function (require, exports) {
"use strict";
});
4 changes: 2 additions & 2 deletions tests/baselines/reference/invalidLetInForOfAndForIn_ES5.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ for (let in [1,2,3]) {}
// This should be an error
// More details: http://www.ecma-international.org/ecma-262/6.0/#sec-iteration-statements
var let = 10;
for (let of = [1, 2, 3], { }; ; )
for ( in [1, 2, 3]) { }
for (let of = [1, 2, 3], {}; ; )
for (let in [1, 2, 3]) { }
4 changes: 2 additions & 2 deletions tests/baselines/reference/invalidLetInForOfAndForIn_ES6.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ for (let in [1,2,3]) {}
// This should be an error
// More details: http://www.ecma-international.org/ecma-262/6.0/#sec-iteration-statements
var let = 10;
for (let of = [1, 2, 3], { }; ; )
for ( in [1, 2, 3]) { }
for (let of = [1, 2, 3], {}; ; )
for (let in [1, 2, 3]) { }
1 change: 1 addition & 0 deletions tests/baselines/reference/isolatedModulesOut.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export var x;
var y;

//// [all.js]
export var x;
var y;
8 changes: 4 additions & 4 deletions tests/baselines/reference/isolatedModulesPlainFile-System.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ run(1);


//// [isolatedModulesPlainFile-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;
return {
setters:[],
execute: function() {
setters: [],
execute: function () {
run(1);
}
}
};
});
6 changes: 3 additions & 3 deletions tests/baselines/reference/isolatedModulesPlainFile-UMD.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ run(1);


//// [isolatedModulesPlainFile-UMD.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";
run(1);
});
2 changes: 1 addition & 1 deletion tests/baselines/reference/localClassesInLoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use(data[0]() === data[1]());
//// [localClassesInLoop.js]
"use strict";
var data = [];
var _loop_1 = function(x) {
var _loop_1 = function (x) {
var C = (function () {
function C() {
}
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/modifierOnParameter1.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class C {

//// [modifierOnParameter1.js]
var C = (function () {
function C() {
function C(p) {
}
return C;
}());
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ let x: Observable<number>;

//// [observable.js]
define(["require", "exports"], function (require, exports) {
"use strict";
});
//// [map1.js]
define(["require", "exports", "./observable"], function (require, exports, observable_1) {
Expand Down
1 change: 0 additions & 1 deletion tests/baselines/reference/moduleAugmentationNoNewNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ let x: Observable<number>;
let y = x.map(x => x + 1);

//// [observable.js]
"use strict";
//// [map.js]
"use strict";
var observable_1 = require("./observable");
Expand Down
8 changes: 4 additions & 4 deletions tests/baselines/reference/modulePrologueSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
export class Foo {}

//// [modulePrologueSystem.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 Foo;
return {
setters:[],
execute: function() {
setters: [],
execute: function () {
Foo = (function () {
function Foo() {
}
return Foo;
}());
exports_1("Foo", Foo);
}
}
};
});
6 changes: 3 additions & 3 deletions tests/baselines/reference/modulePrologueUmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
export class Foo {}

//// [modulePrologueUmd.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 Foo = (function () {
function Foo() {
Expand Down
6 changes: 4 additions & 2 deletions tests/baselines/reference/noEmitHelpers2.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ var A = (function () {
}());
A = __decorate([
decorator,
__param(1, decorator),
__metadata('design:paramtypes', [Number, String])
__param(1, decorator),
__metadata("design:typeinfo", {
paramTypes: function () { return [Number, String]; }
})
], A);
6 changes: 3 additions & 3 deletions tests/baselines/reference/noImplicitAnyInCastExpression.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ interface IFoo {
//// [noImplicitAnyInCastExpression.js]
// verify no noImplictAny errors reported with cast expression
// Expr type not assignable to target type
{ a: null };
({ a: null });
// Expr type assignable to target type
{ a: 2, b: undefined };
({ a: 2, b: undefined });
// Neither types is assignable to each other
{ c: null };
({ c: null });
8 changes: 4 additions & 4 deletions tests/baselines/reference/noImplicitUseStrict_system.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
export var x = 0;

//// [noImplicitUseStrict_system.js]
System.register([], function(exports_1, context_1) {
System.register([], function (exports_1, context_1) {
var __moduleName = context_1 && context_1.id;
var x;
return {
setters:[],
execute: function() {
setters: [],
execute: function () {
exports_1("x", x = 0);
}
}
};
});
6 changes: 3 additions & 3 deletions tests/baselines/reference/noImplicitUseStrict_umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
export var x = 0;

//// [noImplicitUseStrict_umd.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) {
exports.x = 0;
});
10 changes: 5 additions & 5 deletions tests/baselines/reference/numericClassMembers1.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ class C236 {
var C234 = (function () {
function C234() {
this[0] = 1;
this[0.0] = 2;
this[0] = 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an error, it should be using the raw literal text. I have a similar issue with binary/octal integers I need to investigate. I wouldn't accept the baseline for this file.

}
return C234;
}());
var C235 = (function () {
function C235() {
this[0.0] = 1;
this['0'] = 2;
this[0] = 1;
this["0"] = 2;
}
return C235;
}());
var C236 = (function () {
function C236() {
this['0.0'] = 1;
this['0'] = 2;
this["0.0"] = 1;
this["0"] = 2;
}
return C236;
}());
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ toString();
var i = 1;
var test1 = i.toString();
var test2 = 2., toString = ();
var test3 = 3 .toString();
var test4 = 3 .toString();
var test5 = 3 .toString();
var test3 = 3..toString();
var test4 = 3..toString();
var test5 = 3..toString();
var test6 = 3.['toString']();
var test7 = 3
.toString();
Expand Down
3 changes: 2 additions & 1 deletion tests/baselines/reference/objectLiteralWithSemicolons4.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ var v = {

//// [objectLiteralWithSemicolons4.js]
var v = {
a: };
a:
};
17 changes: 17 additions & 0 deletions tests/baselines/reference/outModuleConcatCommonjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ var __extends = (this && this.__extends) || function (d, b) {
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
// This should be an error
"use strict";
var A = (function () {
function A() {
}
return A;
}());
exports.A = A;
"use strict";
var a_1 = require("./ref/a");
var B = (function (_super) {
__extends(B, _super);
function B() {
_super.apply(this, arguments);
}
return B;
}(a_1.A));
exports.B = B;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wary of accepting any new baseline for a test that specifies outFile

//# sourceMappingURL=all.js.map

//// [all.d.ts]
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/outModuleConcatCommonjs.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading