From ecaf4ad2214b951c72d0e65e3d87c169206e05b3 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 18 Aug 2014 13:44:18 -0700 Subject: [PATCH] Baselines update after comment formatting pull request (#455) was merged --- .../reference/commentsExternalModules3.js | 6 +-- tests/baselines/reference/commentsFunction.js | 44 +++++++++++++++++-- .../reference/commentsOnObjectLiteral4.js | 6 +-- tests/baselines/reference/commentsVarDecl.js | 2 +- tests/baselines/reference/enumBasics1.js | 36 +++++++-------- .../baselines/reference/parserS7.2_A1.5_T2.js | 10 ++--- .../reference/scannerS7.2_A1.5_T2.js | 10 ++--- 7 files changed, 76 insertions(+), 38 deletions(-) diff --git a/tests/baselines/reference/commentsExternalModules3.js b/tests/baselines/reference/commentsExternalModules3.js index 4b241aca02..afade653a6 100644 --- a/tests/baselines/reference/commentsExternalModules3.js +++ b/tests/baselines/reference/commentsExternalModules3.js @@ -97,12 +97,12 @@ var myvar = new m1.m2.c(); (function (m4) { /** b's comment */ m4.b; - /** foo's comment + /** foo's comment */ function foo() { return m4.b; } - /** m2 comments + /** m2 comments */ (function (m2) { /** class comment; */ @@ -155,7 +155,7 @@ export declare module m1 { export declare module m4 { /** b's comment */ var b: number; - /** m2 comments + /** m2 comments */ module m2 { /** class comment; */ diff --git a/tests/baselines/reference/commentsFunction.js b/tests/baselines/reference/commentsFunction.js index a4dca3438b..a8fbfbd10b 100644 --- a/tests/baselines/reference/commentsFunction.js +++ b/tests/baselines/reference/commentsFunction.js @@ -63,8 +63,8 @@ var lambdaFoo = function (a, b) { return a + b; }; var lambddaNoVarComment = function (a, b) { return a * b; }; lambdaFoo(10, 20); lambddaNoVarComment(10, 20); -function blah(a /* multiline trailing comment -multiline */) { +function blah(a /* multiline trailing comment + multiline */) { } function blah2(a /* single line multiple trailing comments */ /* second */) { } @@ -73,7 +73,45 @@ function blah3(a // trailing commen single line } lambdaFoo = function (a, b) { return a * b; }; // This is trailing comment /*leading comment*/ (function () { return 0; }); // Needs to be wrapped in parens to be a valid expression (not declaration) -/*leading comment*/ (function () { return 0; }); //trailing comment +/** This comment should appear for foo*/ +function foo() { +} /* trailing comment of function */ +foo(); +/** This is comment for function signature*/ +function fooWithParameters(/** this is comment about a*/a: string, + /** this is comment for b*/ + b: number) { + var d = a; +} // trailing comment of function +fooWithParameters("a", 10); +/** fooFunc + * comment + */ +var fooFunc = function FooFunctionValue(/** fooFunctionValue param */ b: string) { + return b; +} + +/// lamdaFoo var comment +var lambdaFoo = /** this is lambda comment*/ (/**param a*/a: number, /**param b*/b: number) => a + b; +var lambddaNoVarComment = /** this is lambda multiplication*/ (/**param a*/a: number, /**param b*/b: number) => a * b; +lambdaFoo(10, 20); +lambddaNoVarComment(10, 20); + +function blah(a: string /* multiline trailing comment +multiline */) { +} + +function blah2(a: string /* single line multiple trailing comments */ /* second */) { +} + +function blah3(a: string // trailing commen single line + ) { +} + +lambdaFoo = (a, b) => a * b; // This is trailing comment + +/*leading comment*/() => 0; // Needs to be wrapped in parens to be a valid expression (not declaration) + (function () { return 0; }); //trailing comment //// [commentsFunction.d.ts] diff --git a/tests/baselines/reference/commentsOnObjectLiteral4.js b/tests/baselines/reference/commentsOnObjectLiteral4.js index 65fe1ee9a0..3b7efefdff 100644 --- a/tests/baselines/reference/commentsOnObjectLiteral4.js +++ b/tests/baselines/reference/commentsOnObjectLiteral4.js @@ -11,9 +11,9 @@ var v = { //// [commentsOnObjectLiteral4.js] var v = { - /** - * @type {number} - */ + /** + * @type {number} + */ get bar() { return this._bar; } diff --git a/tests/baselines/reference/commentsVarDecl.js b/tests/baselines/reference/commentsVarDecl.js index a5b427e8bb..5105e03879 100644 --- a/tests/baselines/reference/commentsVarDecl.js +++ b/tests/baselines/reference/commentsVarDecl.js @@ -56,7 +56,7 @@ var anotherAnotherVariable = 70; /* these are multiple trailing comments */ /* m /** Triple slash multiline comment*/ /** another line in the comment*/ /** comment line 2*/ -var x = 70; /* multiline trailing comment +var x = 70; /* multiline trailing comment this is multiline trailing comment */ /** Triple slash comment on the assignement shouldnt be in .d.ts file*/ x = myVariable; diff --git a/tests/baselines/reference/enumBasics1.js b/tests/baselines/reference/enumBasics1.js index 6a441f2929..b6c8c75f33 100644 --- a/tests/baselines/reference/enumBasics1.js +++ b/tests/baselines/reference/enumBasics1.js @@ -44,24 +44,24 @@ var E; E[E["B"] = 2] = "B"; E[E["C"] = 3] = "C"; })(E || (E = {})); -/* -var a: E; -var b = E["B"]; // shouldn't error - - -function foo(e: E) {} - -foo(a); // shouldn't error - - -class C { - public e: E; - - public m(): E { return this.e; } // shouldn't error -} - - -var e = E; // shouldn't error +/* +var a: E; +var b = E["B"]; // shouldn't error + + +function foo(e: E) {} + +foo(a); // shouldn't error + + +class C { + public e: E; + + public m(): E { return this.e; } // shouldn't error +} + + +var e = E; // shouldn't error */ 1 /* A */.A; // should error var E2; diff --git a/tests/baselines/reference/parserS7.2_A1.5_T2.js b/tests/baselines/reference/parserS7.2_A1.5_T2.js index cf0be93bc4..76ee647e43 100644 --- a/tests/baselines/reference/parserS7.2_A1.5_T2.js +++ b/tests/baselines/reference/parserS7.2_A1.5_T2.js @@ -27,11 +27,11 @@ if (x !== 1) { //// [parserS7.2_A1.5_T2.js] // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * NO-BREAK SPACE (U+00A0) between any two tokens is allowed - * - * @path ch07/7.2/S7.2_A1.5_T2.js - * @description Insert real NO-BREAK SPACE between tokens of var x=1 +/** + * NO-BREAK SPACE (U+00A0) between any two tokens is allowed + * + * @path ch07/7.2/S7.2_A1.5_T2.js + * @description Insert real NO-BREAK SPACE between tokens of var x=1 */ //CHECK#1 eval("\u00A0var x\u00A0= 1\u00A0"); diff --git a/tests/baselines/reference/scannerS7.2_A1.5_T2.js b/tests/baselines/reference/scannerS7.2_A1.5_T2.js index 7bf3c42452..510403d6e3 100644 --- a/tests/baselines/reference/scannerS7.2_A1.5_T2.js +++ b/tests/baselines/reference/scannerS7.2_A1.5_T2.js @@ -27,11 +27,11 @@ if (x !== 1) { //// [scannerS7.2_A1.5_T2.js] // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * NO-BREAK SPACE (U+00A0) between any two tokens is allowed - * - * @path ch07/7.2/S7.2_A1.5_T2.js - * @description Insert real NO-BREAK SPACE between tokens of var x=1 +/** + * NO-BREAK SPACE (U+00A0) between any two tokens is allowed + * + * @path ch07/7.2/S7.2_A1.5_T2.js + * @description Insert real NO-BREAK SPACE between tokens of var x=1 */ //CHECK#1 eval("\u00A0var x\u00A0= 1\u00A0");