Merge pull request #8158 from Microsoft/updateBaselines2

Update baselines
This commit is contained in:
Mohamed Hegazy 2016-04-18 14:46:44 -07:00
commit 8cf32b55ad
26 changed files with 52 additions and 121 deletions

View File

@ -4,5 +4,5 @@ import Foo From './Foo'; // Syntax error
export default Foo
//// [declarationEmit_UnknownImport2.js]
"use strict";
'./Foo'; // Syntax error
"use strict";

View File

@ -45,7 +45,7 @@ System.register([], function (exports_1, context_1) {
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __moduleName = context_1 && context_1.id;
var decorator, default_1_1;
var decorator, default_1;
return {
setters: [],
execute: function () {

View File

@ -28,7 +28,7 @@ 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

@ -7,8 +7,8 @@ var a: any;
//// [emptyAssignmentPatterns03_ES5.js]
var a;
({} = a);
([] = a);
(a);
(a);
//// [emptyAssignmentPatterns03_ES5.d.ts]

View File

@ -21,8 +21,8 @@ var Foo = (function () {
}
return Foo;
}());
Foo.CONSTANT = "Foo";
exports.Foo = Foo;
Foo.CONSTANT = "Foo";
function assert(value) {
if (!value)
throw new Error("Assertion failed!");

View File

@ -154,7 +154,7 @@ exports.xxxx9 = new server_7.x111();
var server_8 = require("./server");
exports.z111 = new server_8.z1();
var server_9 = require("./server");
exports.z2 = new server_9.z2(); // z2 shouldn't give redeclare error
exports.z2 = new server_9.z2();
//// [server.d.ts]

View File

@ -72,7 +72,7 @@ exports.xxxx = server_7.x1;
var server_8 = require("./server");
exports.z111 = server_8.z1;
var server_9 = require("./server");
exports.z2 = server_9.z2; // z2 shouldn't give redeclare error
exports.z2 = server_9.z2;
//// [server.d.ts]

View File

@ -53,7 +53,6 @@ var Bbb;
return SomeType;
}());
Bbb.SomeType = SomeType;
export * from Aaa; // this line causes the nullref
})(Bbb || (Bbb = {}));
var a;

View File

@ -48,7 +48,6 @@ module;
}
return XDate;
}());
exports.XDate = XDate;
}
var d = new XDate();
d.getDay();

View File

@ -24,8 +24,8 @@ define(["require", "exports"], function (require, exports) {
}
return C1;
}());
C1.s1 = true;
exports.C1 = C1;
C1.s1 = true;
});
//// [foo_1.js]
define(["require", "exports"], function (require, exports) {

View File

@ -13,6 +13,5 @@ export module myModule {
"use strict";
var myModule;
(function (myModule) {
import foo = require("importInsideModule_file1");
var a = foo.x;
})(myModule = exports.myModule || (exports.myModule = {}));

View File

@ -21,9 +21,9 @@ var M;
var Point = (function () {
function Point() {
}
return Point;
return M.Point;
}());
M.Point = Point;
M.Point = M.Point;
M.Point = 1; // Error
})(M || (M = {}));
var M2;

View File

@ -43,7 +43,7 @@ export enum Utensils { // Shouldn't error
//// [moduleDuplicateIdentifiers.js]
"use strict";
exports.Foo = 2;
exports.Foo = 42; // Should error
exports.Foo = 42;
var FooBar;
(function (FooBar) {
FooBar.member1 = 2;

View File

@ -32,15 +32,22 @@
//// [moduleElementsInWrongContext.js]
{
export = M;
var v;
function foo() { }
exports["default"] = v;
export * from "ambient";
export { foo };
export { baz as b } from "ambient";
export default v;
var C = (function () {
function C() {
}
return C;
}());
exports["default"] = C;
function bee() { }
exports.bee = bee;
import I2 = require("foo");
import * as Foo from "ambient";
import bar from "ambient";
import { baz } from "ambient";
import "ambient";
}

View File

@ -32,15 +32,22 @@ function blah () {
//// [moduleElementsInWrongContext2.js]
function blah() {
export = M;
var v;
function foo() { }
exports["default"] = v;
export * from "ambient";
export { foo };
export { baz as b } from "ambient";
export default v;
var C = (function () {
function C() {
}
return C;
}());
exports["default"] = C;
function bee() { }
exports.bee = bee;
import I2 = require("foo");
import * as Foo from "ambient";
import bar from "ambient";
import { baz } from "ambient";
import "ambient";
}

View File

@ -35,16 +35,25 @@ module P {
var P;
(function (P) {
{
export = M;
var v;
function foo() { }
P["default"] = v;
export * from "ambient";
export { foo };
export { baz as b } from "ambient";
export default v;
var C = (function () {
function C() {
}
return C;
}());
exports["default"] = C;
P.C = C;
function bee() { }
P.bee = bee;
import I2 = require("foo");
import * as Foo from "ambient";
import bar from "ambient";
import { baz } from "ambient";
import "ambient";
}
})(P || (P = {}));

View File

@ -22,5 +22,4 @@ var x = 0;
var M;
(function (M) {
M.v;
export { x };
})(M = exports.M || (exports.M = {}));

View File

@ -2,4 +2,4 @@
var v = { foo(); }
//// [objectLiteralMemberWithoutBlock1.js]
var v = { foo: function () { } };
var v = {};

View File

@ -1,31 +0,0 @@
//// [tests/cases/compiler/outModuleConcatCommonjs.ts] ////
//// [a.ts]
// This should be an error
export class A { }
//// [b.ts]
import {A} from "./ref/a";
export class B extends A { }
//// [all.js]
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
// This should be an error
//# sourceMappingURL=all.js.map
//// [all.d.ts]
declare module "ref/a" {
export class A {
}
}
declare module "b" {
import { A } from "ref/a";
export class B extends A {
}
}

View File

@ -1,26 +0,0 @@
//// [tests/cases/compiler/outModuleConcatES6.ts] ////
//// [a.ts]
// This should be an error
export class A { }
//// [b.ts]
import {A} from "./ref/a";
export class B extends A { }
//// [all.js]
// This should be an error
//# sourceMappingURL=all.js.map
//// [all.d.ts]
declare module "ref/a" {
export class A {
}
}
declare module "b" {
import { A } from "ref/a";
export class B extends A {
}
}

View File

@ -1,31 +0,0 @@
//// [tests/cases/compiler/outModuleConcatUmd.ts] ////
//// [a.ts]
// This should error
export class A { }
//// [b.ts]
import {A} from "./ref/a";
export class B extends A { }
//// [all.js]
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
// This should error
//# sourceMappingURL=all.js.map
//// [all.d.ts]
declare module "ref/a" {
export class A {
}
}
declare module "b" {
import { A } from "ref/a";
export class B extends A {
}
}

View File

@ -10,5 +10,5 @@ var regex5 = /**// asdf/**/ /;
var regex1 = / asdf /;
var regex2 = / asdf /;
var regex3 = 1;
var regex4 = Math.pow(/ /, /asdf /);
var regex5 = Math.pow(/ asdf/, / /);
var regex4 = Math.pow(/**/ / /, /asdf /);
var regex5 = Math.pow(/**/ / asdf/, / /);

View File

@ -161,11 +161,11 @@ var publicClassWithWithPrivatePropertyTypes = (function () {
}
return publicClassWithWithPrivatePropertyTypes;
}());
exports.publicClassWithWithPrivatePropertyTypes = publicClassWithWithPrivatePropertyTypes;
publicClassWithWithPrivatePropertyTypes.myPublicStaticProperty = exporter.createExportedWidget1(); // Error
publicClassWithWithPrivatePropertyTypes.myPrivateStaticProperty = exporter.createExportedWidget1();
publicClassWithWithPrivatePropertyTypes.myPublicStaticProperty1 = exporter.createExportedWidget3(); // Error
publicClassWithWithPrivatePropertyTypes.myPrivateStaticProperty1 = exporter.createExportedWidget3();
exports.publicClassWithWithPrivatePropertyTypes = publicClassWithWithPrivatePropertyTypes;
var privateClassWithWithPrivatePropertyTypes = (function () {
function privateClassWithWithPrivatePropertyTypes() {
this.myPublicProperty = exporter.createExportedWidget1();
@ -190,9 +190,9 @@ var publicClassWithPrivateModulePropertyTypes = (function () {
}
return publicClassWithPrivateModulePropertyTypes;
}());
exports.publicClassWithPrivateModulePropertyTypes = publicClassWithPrivateModulePropertyTypes;
publicClassWithPrivateModulePropertyTypes.myPublicStaticProperty = exporter.createExportedWidget2(); // Error
publicClassWithPrivateModulePropertyTypes.myPublicStaticProperty1 = exporter.createExportedWidget4(); // Error
exports.publicClassWithPrivateModulePropertyTypes = publicClassWithPrivateModulePropertyTypes;
exports.publicVarWithPrivateModulePropertyTypes = exporter.createExportedWidget2(); // Error
exports.publicVarWithPrivateModulePropertyTypes1 = exporter.createExportedWidget4(); // Error
var privateClassWithPrivateModulePropertyTypes = (function () {

View File

@ -17,7 +17,7 @@ module Q {
//// [privacyCheckAnonymousFunctionParameter2.js]
define(["require", "exports"], function (require, exports) {
"use strict";
exports.x = 1; // Makes this an external module
exports.x = 1;
var Q;
(function (Q) {
function foo(x) {

View File

@ -27,7 +27,7 @@ var B = (function () {
var C = (function (_super) {
__extends(C, _super);
function C(a) {
if (a === void 0) { a = _super.prototype.foo.call(this); }
if (a === void 0) { a = _super.foo.call(this); }
}
return C;
}(B));

View File

@ -30,7 +30,7 @@ System.register([], function (exports_1, context_1) {
exports_1("TopLevelClass", TopLevelClass);
(function (TopLevelModule) {
var v;
})(TopLevelModule || (TopLevelModule = {}));
})(TopLevelModule = TopLevelModule || (TopLevelModule = {}));
exports_1("TopLevelModule", TopLevelModule);
(function (TopLevelEnum) {
TopLevelEnum[TopLevelEnum["E"] = 0] = "E";
@ -53,7 +53,7 @@ System.register([], function (exports_1, context_1) {
NonTopLevelEnum[NonTopLevelEnum["E"] = 0] = "E";
})(TopLevelModule2.NonTopLevelEnum || (TopLevelModule2.NonTopLevelEnum = {}));
var NonTopLevelEnum = TopLevelModule2.NonTopLevelEnum;
})(TopLevelModule2 || (TopLevelModule2 = {}));
})(TopLevelModule2 = TopLevelModule2 || (TopLevelModule2 = {}));
exports_1("TopLevelModule2", TopLevelModule2);
}
};