Skip to content

Commit ee86f8b

Browse files
Harness now prints category and code when running tests.
1 parent 2ba3ae9 commit ee86f8b

File tree

2,236 files changed

+14368
-14368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,236 files changed

+14368
-14368
lines changed

src/harness/harness.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -820,13 +820,13 @@ module Harness {
820820
.split('\n')
821821
.map(s => s.length > 0 && s.charAt(s.length - 1) === '\r' ? s.substr(0, s.length - 1) : s)
822822
.filter(s => s.length > 0)
823-
.map(s => '!!! ' + s);
823+
.map(s => '!!! ' + error.category + " TS" + error.code + ": " + s);
824824
errLines.forEach(e => outputLines.push(e));
825825

826826
totalErrorsReported++;
827827
}
828828

829-
// Report glovbal errors:
829+
// Report global errors:
830830
var globalErrors = diagnostics.filter(err => !err.filename);
831831
globalErrors.forEach(err => outputErrorText(err));
832832

@@ -917,7 +917,7 @@ module Harness {
917917
export function recreate(options?: { useMinimalDefaultLib: boolean; noImplicitAny: boolean; }) {
918918
}
919919

920-
/** The harness' compiler instance used when tests are actually run. Reseting or changing settings of this compiler instance must be done within a testcase (i.e., describe/it) */
920+
/** The harness' compiler instance used when tests are actually run. Reseting or changing settings of this compiler instance must be done within a test case (i.e., describe/it) */
921921
var harnessCompiler: HarnessCompiler;
922922

923923
/** Returns the singleton harness compiler instance for generating and running tests.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction1.ts (1 errors) ====
22
var v = (a: ) => {
33
~
4-
!!! Type expected.
4+
!!! error TS1110: Type expected.
55

66
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction2.ts (2 errors) ====
22
var v = (a: b,) => {
33
~
4-
!!! Trailing comma not allowed.
4+
!!! error TS1009: Trailing comma not allowed.
55
~
6-
!!! Cannot find name 'b'.
6+
!!! error TS2304: Cannot find name 'b'.
77

88
};
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts (3 errors) ====
22
var v = (a): => {
33
~
4-
!!! ',' expected.
4+
!!! error TS1005: ',' expected.
55
~~
6-
!!! ';' expected.
6+
!!! error TS1005: ';' expected.
77
~
8-
!!! Cannot find name 'a'.
8+
!!! error TS2304: Cannot find name 'a'.
99

1010
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
==== tests/cases/compiler/ArrowFunctionExpression1.ts (1 errors) ====
22
var v = (public x: string) => { };
33
~~~~~~~~~~~~~~~~
4-
!!! A parameter property is only allowed in a constructor implementation.
4+
!!! error TS2369: A parameter property is only allowed in a constructor implementation.

tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.errors.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
module clodule1 {
1111
function f(x: T) { }
1212
~
13-
!!! Cannot find name 'T'.
13+
!!! error TS2304: Cannot find name 'T'.
1414
}
1515

1616
class clodule2<T>{
@@ -22,11 +22,11 @@
2222
module clodule2 {
2323
var x: T;
2424
~
25-
!!! Cannot find name 'T'.
25+
!!! error TS2304: Cannot find name 'T'.
2626

2727
class D<U extends T>{
2828
~
29-
!!! Cannot find name 'T'.
29+
!!! error TS2304: Cannot find name 'T'.
3030
id: string;
3131
value: U;
3232
}
@@ -41,7 +41,7 @@
4141
module clodule3 {
4242
export var y = { id: T };
4343
~
44-
!!! Cannot find name 'T'.
44+
!!! error TS2304: Cannot find name 'T'.
4545
}
4646

4747
class clodule4<T>{
@@ -54,7 +54,7 @@
5454
class D {
5555
name: T;
5656
~
57-
!!! Cannot find name 'T'.
57+
!!! error TS2304: Cannot find name 'T'.
5858
}
5959
}
6060

tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// error: duplicate identifier expected
1111
export function fn<T>(x: T, y: T): T {
1212
~~
13-
!!! Duplicate identifier 'fn'.
13+
!!! error TS2300: Duplicate identifier 'fn'.
1414
return x;
1515
}
1616
}

tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// error: duplicate identifier expected
1111
export function fn<T>(x: T, y: T): T {
1212
~~
13-
!!! Duplicate identifier 'fn'.
13+
!!! error TS2300: Duplicate identifier 'fn'.
1414
return x;
1515
}
1616
}

tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.errors.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
export function fn<T>(x: T, y: T): number {
1212
return clodule.sfn('a');
1313
~~~~~~~~~~~
14-
!!! Property 'clodule.sfn' is inaccessible.
14+
!!! error TS2341: Property 'clodule.sfn' is inaccessible.
1515
}
1616
}
1717

tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
module Point {
99
export function Origin() { return null; } //expected duplicate identifier error
1010
~~~~~~
11-
!!! Duplicate identifier 'Origin'.
11+
!!! error TS2300: Duplicate identifier 'Origin'.
1212
}
1313

1414

@@ -22,6 +22,6 @@
2222
export module Point {
2323
export function Origin() { return ""; }//expected duplicate identifier error
2424
~~~~~~
25-
!!! Duplicate identifier 'Origin'.
25+
!!! error TS2300: Duplicate identifier 'Origin'.
2626
}
2727
}

0 commit comments

Comments
 (0)