Rebaseline tests to old emitter

This commit is contained in:
Nathan Shively-Sanders 2016-09-01 18:41:03 -07:00
parent 275a4bd4f3
commit 21439a470d
65 changed files with 62 additions and 84 deletions

View File

@ -83,9 +83,7 @@ f(// comment 1
// comment 2
function () {
// comment 4
}
// comment 5
);
});
// body is not a block
f(function (_) { return 1 +
2; });

View File

@ -32,5 +32,5 @@ define(["require", "exports"], function (require, exports) {
//// [file3.js]
define(["require", "exports", "./file2"], function (require, exports) {
"use strict";
var a;
}); // should not work
var a; // should not work
});

View File

@ -29,5 +29,5 @@ define(["require", "exports"], function (require, exports) {
//// [file3.js]
define(["require", "exports", "file2"], function (require, exports) {
"use strict";
var a;
}); // should not work
var a; // should not work
});

View File

@ -31,5 +31,5 @@ define(["require", "exports"], function (require, exports) {
//// [file3.js]
define(["require", "exports", "./file2"], function (require, exports) {
"use strict";
var a;
}); // should not work
var a; // should not work
});

View File

@ -29,5 +29,5 @@ define(["require", "exports"], function (require, exports) {
//// [file3.js]
define(["require", "exports", "file2"], function (require, exports) {
"use strict";
var a;
}); // should not work
var a; // should not work
});

View File

@ -13,4 +13,4 @@ define(["require", "exports"], function (require, exports) {
c5.prototype.foo = function () { };
return c5;
}());
}); // should be ok everywhere
});

View File

@ -14,4 +14,4 @@ define(["require", "exports"], function (require, exports) {
foo(); // ok
}
return foo;
}); // not ok
});

View File

@ -22,7 +22,7 @@ var Foo = (function () {
function Foo(x) {
// WScript.Echo("Constructor function has executed");
}
Foo.prototype.bar1 = function () { /*WScript.Echo("bar1");*/ };
Foo.prototype.bar1 = function () { };
return Foo;
}());
function F1(a) { return a; }

View File

@ -30,7 +30,7 @@ var Foo = (function () {
function Foo(x) {
// WScript.Echo("Constructor function has executed");
}
Foo.prototype.bar1 = function () { /*WScript.Echo("bar1");*/ };
Foo.prototype.bar1 = function () { };
return Foo;
}());
function F1(s) { return s; } // error

View File

@ -23,7 +23,7 @@ var Foo = (function () {
function Foo(x) {
// WScript.Echo("Constructor function has executed");
}
Foo.prototype.bar1 = function () { /*WScript.Echo("bar1");*/ };
Foo.prototype.bar1 = function () { };
return Foo;
}());
//class Foo(s: String);

View File

@ -23,7 +23,7 @@ var Foo = (function () {
function Foo(x) {
// WScript.Echo("Constructor function has executed");
}
Foo.prototype.bar1 = function () { /*WScript.Echo("bar1");*/ };
Foo.prototype.bar1 = function () { };
return Foo;
}());
var f1 = new Foo("hey");

View File

@ -24,7 +24,7 @@ var Foo = (function () {
function Foo(x) {
// WScript.Echo("Constructor function has executed");
}
Foo.prototype.bar1 = function (a) { /*WScript.Echo(a);*/ };
Foo.prototype.bar1 = function (a) { };
return Foo;
}());
//class Foo(s: String);

View File

@ -90,4 +90,3 @@ function f42(i) {
function f4NoError(arguments) {
var arguments; // No error
}
// no codegen no error

View File

@ -63,4 +63,3 @@ function f4(_i) {
}
function f4NoError(_i) {
}
// no codegen no error

View File

@ -167,4 +167,3 @@ function f3(_this) {
var _this = this;
(function (x) { console.log(_this.x); });
}
// no code gen - no error

View File

@ -3,5 +3,5 @@ function foo(/** nothing */) {
}
//// [commentInEmptyParameterList1.js]
function foo( /** nothing */) {
function foo() {
}

View File

@ -7,4 +7,4 @@ var f: () => any;
//// [commentOnParenthesizedExpressionOpenParen1.js]
var j;
var f;
(/* Preserve */ j = f());
(j = f());

View File

@ -14,7 +14,7 @@ foo(
function foo(/*c1*/ x, /*d1*/ y, /*e1*/ w) { }
var a, b;
foo(/*c2*/ 1, /*d2*/ 1 + 2, /*e1*/ a + b);
foo(/*c3*/ function () { }, /*d2*/ function () { }, /*e2*/ a + /*e3*/ b);
foo(/*c3*/ function () { }, /*d2*/ function () { }, /*e2*/ a + b);
foo(/*c3*/ function () { }, /*d3*/ function () { }, /*e3*/ (a + b));
foo(
/*c4*/ function () { },

View File

@ -74,8 +74,8 @@ var fooFunc = function FooFunctionValue(/** fooFunctionValue param */ b) {
return b;
};
/// lamdaFoo var comment
var lambdaFoo = /** this is lambda comment*/ function (/**param a*/ a, /**param b*/ b) { return a + b; };
var lambddaNoVarComment = /** this is lambda multiplication*/ function (/**param a*/ a, /**param b*/ b) { return a * b; };
var lambdaFoo = function (/**param a*/ a, /**param b*/ b) { return a + b; };
var lambddaNoVarComment = function (/**param a*/ a, /**param b*/ b) { return a * b; };
lambdaFoo(10, 20);
lambddaNoVarComment(10, 20);
function blah(a /* multiline trailing comment

View File

@ -64,13 +64,13 @@ x = myVariable;
/** jsdocstyle comment - only this comment should be in .d.ts file*/
var n = 30;
/** var deckaration with comment on type as well*/
var y = /** value comment */ 20;
var y = 20;
/// var deckaration with comment on type as well
var yy =
/// value comment
20;
/** comment2 */
var z = /** lambda comment */ function (x, y) { return x + y; };
var z = function (x, y) { return x + y; };
var z2;
var x2 = z2;
var n4;
@ -98,6 +98,6 @@ declare var y: number;
declare var yy: number;
/** comment2 */
declare var z: (x: number, y: number) => number;
declare var z2: /** type comment*/ (x: number) => string;
declare var z2: (x: number) => string;
declare var x2: (x: number) => string;
declare var n4: (x: number) => string;

View File

@ -34,5 +34,5 @@ extractIndexer((_b = {},
extractIndexer((_c = {},
_c["" || 0] = "",
_c
));
var _a, _b, _c; // Should return any (widened form of undefined)
)); // Should return any (widened form of undefined)
var _a, _b, _c;

View File

@ -25,8 +25,8 @@ f1.bar2();
var Foo = (function () {
function Foo(x) {
}
Foo.prototype.bar1 = function () { /*WScript.Echo("bar1");*/ };
Foo.prototype.bar2 = function () { /*WScript.Echo("bar1");*/ };
Foo.prototype.bar1 = function () { };
Foo.prototype.bar2 = function () { };
return Foo;
}());
var f1 = new Foo("hey");

View File

@ -34,7 +34,7 @@ var __extends = (this && this.__extends) || function (d, b) {
var FooBase = (function () {
function FooBase(x) {
}
FooBase.prototype.bar1 = function () { /*WScript.Echo("base bar1");*/ };
FooBase.prototype.bar1 = function () { };
return FooBase;
}());
var Foo = (function (_super) {
@ -42,7 +42,7 @@ var Foo = (function (_super) {
function Foo(x, y) {
_super.call(this, x);
}
Foo.prototype.bar1 = function () { /*WScript.Echo("bar1");*/ };
Foo.prototype.bar1 = function () { };
return Foo;
}(FooBase));
var f1 = new Foo("hey");

View File

@ -32,7 +32,7 @@ var Foo = (function (_super) {
__extends(Foo, _super);
function Foo(x, y) {
}
Foo.prototype.bar1 = function () { /*WScript.Echo("Yo");*/ };
Foo.prototype.bar1 = function () { };
return Foo;
}(FooBase));
var f1 = new Foo("hey");

View File

@ -9,9 +9,9 @@ var x: (...y: string[]) => void = function (.../*3*/y) {
//// [contextuallyTypingRestParameters.js]
var x = function () {
var /*3*/ y = [];
var y = [];
for (var _i = 0; _i < arguments.length; _i++) {
/*3*/ y[_i - 0] = arguments[_i];
y[_i - 0] = arguments[_i];
}
var t = y;
var x2 = t; // This should be error

View File

@ -12,7 +12,7 @@ var /*2*/x = point.x;
point./*3*/x = 30;
//// [declFileObjectLiteralWithAccessors.js]
function /*1*/ makePoint(x) {
function makePoint(x) {
return {
b: 10,
get x() { return x; },
@ -22,7 +22,7 @@ function /*1*/ makePoint(x) {
;
var /*4*/ point = makePoint(2);
var /*2*/ x = point.x;
point./*3*/ x = 30;
point.x = 30;
//// [declFileObjectLiteralWithAccessors.d.ts]

View File

@ -10,14 +10,14 @@ var /*2*/x = point./*3*/x;
//// [declFileObjectLiteralWithOnlyGetter.js]
function /*1*/ makePoint(x) {
function makePoint(x) {
return {
get x() { return x; },
};
}
;
var /*4*/ point = makePoint(2);
var /*2*/ x = point./*3*/ x;
var /*2*/ x = point.x;
//// [declFileObjectLiteralWithOnlyGetter.d.ts]

View File

@ -10,7 +10,7 @@ var /*3*/point = makePoint(2);
point./*2*/x = 30;
//// [declFileObjectLiteralWithOnlySetter.js]
function /*1*/ makePoint(x) {
function makePoint(x) {
return {
b: 10,
set x(a) { this.b = a; }
@ -18,7 +18,7 @@ function /*1*/ makePoint(x) {
}
;
var /*3*/ point = makePoint(2);
point./*2*/ x = 30;
point.x = 30;
//// [declFileObjectLiteralWithOnlySetter.d.ts]

View File

@ -21,7 +21,7 @@ define(["require", "exports"], function (require, exports) {
define(["require", "exports", "server"], function (require, exports, server_1) {
"use strict";
exports.x = server_1.default;
}); // non referenced
});
//// [server.d.ts]

View File

@ -22,7 +22,6 @@ exports.c = c;
"use strict";
var nameSpaceBinding = require("./server");
exports.x = new nameSpaceBinding.c();
// unreferenced
//// [server.d.ts]

View File

@ -14,4 +14,3 @@ var a = 10;
module.exports = a;
//// [es6ImportNameSpaceImportNoNamedExports_1.js]
"use strict";
// error

View File

@ -7,4 +7,3 @@ import { default as yield } from "somemodule"; // no error
import { default as default } from "somemodule"; // default as is ok, error of default binding name
//// [es6ImportNamedImportIdentifiersParsing.js]
// default as is ok, error of default binding name

View File

@ -8,4 +8,3 @@ namespace N {
export = N; // Error
//// [es6modulekindWithES5Target10.js]
// Error

View File

@ -12,4 +12,3 @@ export declare function bar(): X.bar; // error
//// [exportSpecifierReferencingOuterDeclaration2_A.js]
//// [exportSpecifierReferencingOuterDeclaration2_B.js]
"use strict";
// error

View File

@ -4,4 +4,3 @@ interface A<T, U extends C<T>> { x: U; }
interface B extends A<{}, { x: {} }> { } // Should not produce an error
//// [genericConstraint3.js]
// Should not produce an error

View File

@ -28,4 +28,3 @@ interface G extends A, B, C, E { } // should only report one error
interface H extends A, F { } // Should report no error at all because error is internal to F
//// [inheritedMembersAndIndexSignaturesFromDifferentBases.js]
// Should report no error at all because error is internal to F

View File

@ -10,4 +10,3 @@ interface B {
interface C extends B, A<string> { } // Should succeed
//// [inheritedMembersAndIndexSignaturesFromDifferentBases2.js]
// Should succeed

View File

@ -29,4 +29,3 @@ interface D2 {
interface E2 extends A2, D2 { } // error
//// [inheritedStringIndexersFromDifferentBaseTypes.js]
// error

View File

@ -25,4 +25,3 @@ interface F extends A, D {
} // ok because we overrode D's number index signature
//// [inheritedStringIndexersFromDifferentBaseTypes2.js]
// ok because we overrode D's number index signature

View File

@ -62,7 +62,7 @@ a['foo'] > ;
<a><a />;
<a b=>;
var x = <div>one</div><div>two</div>;;
var x = <div>one</div>/* intervening comment */ /* intervening comment */ <div>two</div>;;
var x = <div>one</div> /* intervening comment */ /* intervening comment */ <div>two</div>;;
<a>{"str"}}</a>;
<span className="a"/> id="b" />;
<div className/>>;
@ -76,4 +76,4 @@ var x = <div>one</div>/* intervening comment */ /* intervening comment */ <div>
<a b=>;
<a b={ < }>;
<a>}</a>;
<a />/*hai*/ /*hai*/asdf/>;</></></></>;
<a /> /*hai*//*hai*/asdf/>;</></></></>;

View File

@ -10,4 +10,3 @@ interface B<T> {
interface C<T> extends A<T>, B<T> { } // Should not be an error
//// [nonConflictingRecursiveBaseTypeMembers.js]
// Should not be an error

View File

@ -42,5 +42,6 @@ var C2 = (function () {
return C2;
}());
var b = {
x: function () { }, 1: // error
x: function () { }, 1: // error
// error
};

View File

@ -8,7 +8,7 @@ var regex5 = /**// asdf/**/ /;
//// [parseRegularExpressionMixedWithComments.js]
var regex1 = / asdf /;
var regex2 = /**/ / 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

@ -6,6 +6,5 @@
//// [parserGreaterThanTokenAmbiguity10.js]
1
// before
>>>
2;

View File

@ -2,5 +2,5 @@
1 >>/**/= 2;
//// [parserGreaterThanTokenAmbiguity13.js]
1 >> /**/ ;
1 >> ; /**/
2;

View File

@ -6,6 +6,5 @@
//// [parserGreaterThanTokenAmbiguity15.js]
1
// before
>>=
2;

View File

@ -2,5 +2,5 @@
1 >>>/**/= 2;
//// [parserGreaterThanTokenAmbiguity18.js]
1 >>> /**/ ;
1 >>> ; /**/
2;

View File

@ -6,6 +6,5 @@
//// [parserGreaterThanTokenAmbiguity20.js]
1
// Before
>>>=
2;

View File

@ -2,4 +2,4 @@
1 >/**/> 2;
//// [parserGreaterThanTokenAmbiguity3.js]
1 > /**/ /**/ > 2;
1 > /**/ > 2;

View File

@ -6,6 +6,5 @@
//// [parserGreaterThanTokenAmbiguity5.js]
1
// before
>>
2;

View File

@ -2,4 +2,4 @@
1 >>/**/> 2;
//// [parserGreaterThanTokenAmbiguity8.js]
1 >> /**/ /**/ > 2;
1 >> /**/ > 2;

View File

@ -2,4 +2,4 @@
\ /*foo*/ ;
//// [parserSkippedTokens5.js]
/*foo*/ ;
;

View File

@ -2,4 +2,3 @@
/*foo*/ \ /*bar*/
//// [parserSkippedTokens7.js]
/*bar*/

View File

@ -3,4 +3,4 @@
/*foo*/ \ /*bar*/
//// [parserSkippedTokens8.js]
; /*bar*/
;

View File

@ -4,4 +4,3 @@
//// [parserSkippedTokens9.js]
; // existing trivia
/*bar*/

View File

@ -29,4 +29,4 @@ define(["require", "exports"], function (require, exports) {
//// [recursiveExportAssignmentAndFindAliasedType1_moduleA.js]
define(["require", "exports"], function (require, exports) {
"use strict";
}); // This should result in type ClassB
});

View File

@ -33,4 +33,4 @@ define(["require", "exports"], function (require, exports) {
//// [recursiveExportAssignmentAndFindAliasedType2_moduleA.js]
define(["require", "exports"], function (require, exports) {
"use strict";
}); // This should result in type ClassB
});

View File

@ -37,4 +37,4 @@ define(["require", "exports"], function (require, exports) {
//// [recursiveExportAssignmentAndFindAliasedType3_moduleA.js]
define(["require", "exports"], function (require, exports) {
"use strict";
}); // This should result in type ClassB
});

View File

@ -31,4 +31,4 @@ define(["require", "exports"], function (require, exports) {
//// [recursiveExportAssignmentAndFindAliasedType4_moduleA.js]
define(["require", "exports"], function (require, exports) {
"use strict";
}); // This should result in type ClassB
});

View File

@ -40,4 +40,4 @@ define(["require", "exports"], function (require, exports) {
//// [recursiveExportAssignmentAndFindAliasedType5_moduleA.js]
define(["require", "exports"], function (require, exports) {
"use strict";
}); // This should result in type ClassB
});

View File

@ -49,4 +49,4 @@ define(["require", "exports"], function (require, exports) {
//// [recursiveExportAssignmentAndFindAliasedType6_moduleA.js]
define(["require", "exports"], function (require, exports) {
"use strict";
}); // This should result in type ClassB
});

View File

@ -51,4 +51,4 @@ define(["require", "exports"], function (require, exports) {
//// [recursiveExportAssignmentAndFindAliasedType7_moduleA.js]
define(["require", "exports"], function (require, exports) {
"use strict";
}); // This should result in type ClassB
});

View File

@ -107,4 +107,4 @@ var SomeEnum;
SomeEnum[SomeEnum["A"] = this] = "A";
SomeEnum[SomeEnum["B"] = this.spaaaace] = "B"; // Also should not be allowed
})(SomeEnum || (SomeEnum = {}));
module.exports = this; // Should be an error
module.exports = this;

View File

@ -8,4 +8,4 @@ var x = </**/div></div>;
//// [file.jsx]
var x = </**/ div></div>;
var x = <div></div>;

View File

@ -11,4 +11,3 @@ declare module m {
declare var m: m.IStatic; // Should be ok to have var 'm' as module is non instantiated
//// [typeAliasDoesntMakeModuleInstantiated.js]
// Should be ok to have var 'm' as module is non instantiated