Skip to content

Commit ecaf4ad

Browse files
committed
Baselines update after comment formatting pull request (#455) was merged
1 parent e0faa65 commit ecaf4ad

File tree

7 files changed

+76
-38
lines changed

7 files changed

+76
-38
lines changed

tests/baselines/reference/commentsExternalModules3.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ var myvar = new m1.m2.c();
9797
(function (m4) {
9898
/** b's comment */
9999
m4.b;
100-
/** foo's comment
100+
/** foo's comment
101101
*/
102102
function foo() {
103103
return m4.b;
104104
}
105-
/** m2 comments
105+
/** m2 comments
106106
*/
107107
(function (m2) {
108108
/** class comment; */
@@ -155,7 +155,7 @@ export declare module m1 {
155155
export declare module m4 {
156156
/** b's comment */
157157
var b: number;
158-
/** m2 comments
158+
/** m2 comments
159159
*/
160160
module m2 {
161161
/** class comment; */

tests/baselines/reference/commentsFunction.js

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ var lambdaFoo = function (a, b) { return a + b; };
6363
var lambddaNoVarComment = function (a, b) { return a * b; };
6464
lambdaFoo(10, 20);
6565
lambddaNoVarComment(10, 20);
66-
function blah(a /* multiline trailing comment
67-
multiline */) {
66+
function blah(a /* multiline trailing comment
67+
multiline */) {
6868
}
6969
function blah2(a /* single line multiple trailing comments */ /* second */) {
7070
}
@@ -73,7 +73,45 @@ function blah3(a // trailing commen single line
7373
}
7474
lambdaFoo = function (a, b) { return a * b; }; // This is trailing comment
7575
/*leading comment*/ (function () { return 0; }); // Needs to be wrapped in parens to be a valid expression (not declaration)
76-
/*leading comment*/ (function () { return 0; }); //trailing comment
76+
/** This comment should appear for foo*/
77+
function foo() {
78+
} /* trailing comment of function */
79+
foo();
80+
/** This is comment for function signature*/
81+
function fooWithParameters(/** this is comment about a*/a: string,
82+
/** this is comment for b*/
83+
b: number) {
84+
var d = a;
85+
} // trailing comment of function
86+
fooWithParameters("a", 10);
87+
/** fooFunc
88+
* comment
89+
*/
90+
var fooFunc = function FooFunctionValue(/** fooFunctionValue param */ b: string) {
91+
return b;
92+
}
93+
94+
/// lamdaFoo var comment
95+
var lambdaFoo = /** this is lambda comment*/ (/**param a*/a: number, /**param b*/b: number) => a + b;
96+
var lambddaNoVarComment = /** this is lambda multiplication*/ (/**param a*/a: number, /**param b*/b: number) => a * b;
97+
lambdaFoo(10, 20);
98+
lambddaNoVarComment(10, 20);
99+
100+
function blah(a: string /* multiline trailing comment
101+
multiline */) {
102+
}
103+
104+
function blah2(a: string /* single line multiple trailing comments */ /* second */) {
105+
}
106+
107+
function blah3(a: string // trailing commen single line
108+
) {
109+
}
110+
111+
lambdaFoo = (a, b) => a * b; // This is trailing comment
112+
113+
/*leading comment*/() => 0; // Needs to be wrapped in parens to be a valid expression (not declaration)
114+
(function () { return 0; }); //trailing comment
77115

78116

79117
//// [commentsFunction.d.ts]

tests/baselines/reference/commentsOnObjectLiteral4.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ var v = {
1111

1212
//// [commentsOnObjectLiteral4.js]
1313
var v = {
14-
/**
15-
* @type {number}
16-
*/
14+
/**
15+
* @type {number}
16+
*/
1717
get bar() {
1818
return this._bar;
1919
}

tests/baselines/reference/commentsVarDecl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var anotherAnotherVariable = 70; /* these are multiple trailing comments */ /* m
5656
/** Triple slash multiline comment*/
5757
/** another line in the comment*/
5858
/** comment line 2*/
59-
var x = 70; /* multiline trailing comment
59+
var x = 70; /* multiline trailing comment
6060
this is multiline trailing comment */
6161
/** Triple slash comment on the assignement shouldnt be in .d.ts file*/
6262
x = myVariable;

tests/baselines/reference/enumBasics1.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,24 @@ var E;
4444
E[E["B"] = 2] = "B";
4545
E[E["C"] = 3] = "C";
4646
})(E || (E = {}));
47-
/*
48-
var a: E;
49-
var b = E["B"]; // shouldn't error
50-
51-
52-
function foo(e: E) {}
53-
54-
foo(a); // shouldn't error
55-
56-
57-
class C {
58-
public e: E;
59-
60-
public m(): E { return this.e; } // shouldn't error
61-
}
62-
63-
64-
var e = E; // shouldn't error
47+
/*
48+
var a: E;
49+
var b = E["B"]; // shouldn't error
50+
51+
52+
function foo(e: E) {}
53+
54+
foo(a); // shouldn't error
55+
56+
57+
class C {
58+
public e: E;
59+
60+
public m(): E { return this.e; } // shouldn't error
61+
}
62+
63+
64+
var e = E; // shouldn't error
6565
*/
6666
1 /* A */.A; // should error
6767
var E2;

tests/baselines/reference/parserS7.2_A1.5_T2.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ if (x !== 1) {
2727
//// [parserS7.2_A1.5_T2.js]
2828
// Copyright 2009 the Sputnik authors. All rights reserved.
2929
// This code is governed by the BSD license found in the LICENSE file.
30-
/**
31-
* NO-BREAK SPACE (U+00A0) between any two tokens is allowed
32-
*
33-
* @path ch07/7.2/S7.2_A1.5_T2.js
34-
* @description Insert real NO-BREAK SPACE between tokens of var x=1
30+
/**
31+
* NO-BREAK SPACE (U+00A0) between any two tokens is allowed
32+
*
33+
* @path ch07/7.2/S7.2_A1.5_T2.js
34+
* @description Insert real NO-BREAK SPACE between tokens of var x=1
3535
*/
3636
//CHECK#1
3737
eval("\u00A0var x\u00A0= 1\u00A0");

tests/baselines/reference/scannerS7.2_A1.5_T2.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ if (x !== 1) {
2727
//// [scannerS7.2_A1.5_T2.js]
2828
// Copyright 2009 the Sputnik authors. All rights reserved.
2929
// This code is governed by the BSD license found in the LICENSE file.
30-
/**
31-
* NO-BREAK SPACE (U+00A0) between any two tokens is allowed
32-
*
33-
* @path ch07/7.2/S7.2_A1.5_T2.js
34-
* @description Insert real NO-BREAK SPACE between tokens of var x=1
30+
/**
31+
* NO-BREAK SPACE (U+00A0) between any two tokens is allowed
32+
*
33+
* @path ch07/7.2/S7.2_A1.5_T2.js
34+
* @description Insert real NO-BREAK SPACE between tokens of var x=1
3535
*/
3636
//CHECK#1
3737
eval("\u00A0var x\u00A0= 1\u00A0");

0 commit comments

Comments
 (0)