Adds missing test cases
This commit is contained in:
parent
d5c24f3cd3
commit
f9e85ec091
|
@ -1,17 +1,23 @@
|
|||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(2,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(8,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(9,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(18,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(22,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(6,12): error TS1005: 'finally' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(10,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(11,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(15,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(17,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(19,20): error TS1003: Identifier expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts (5 errors) ====
|
||||
==== tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts (7 errors) ====
|
||||
function fn() {
|
||||
catch(x) { } // error missing try
|
||||
~~~~~
|
||||
!!! error TS1005: 'try' expected.
|
||||
|
||||
finally{ } // potential error; can be absorbed by the 'catch'
|
||||
finally { } // potential error; can be absorbed by the 'catch'
|
||||
|
||||
try { }; // missing finally
|
||||
~
|
||||
!!! error TS1005: 'finally' expected.
|
||||
}
|
||||
|
||||
function fn2() {
|
||||
|
@ -21,22 +27,18 @@ tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(22,5):
|
|||
catch (x) { } // error missing try
|
||||
~~~~~
|
||||
!!! error TS1005: 'try' expected.
|
||||
|
||||
try { } finally { } // statement is here, so the 'catch' clause above doesn't absorb errors from the 'finally' clause below
|
||||
|
||||
// no error
|
||||
try {
|
||||
}
|
||||
finally {
|
||||
}
|
||||
|
||||
// error missing try
|
||||
finally {
|
||||
finally { } // error missing try
|
||||
~~~~~~~
|
||||
!!! error TS1005: 'try' expected.
|
||||
}
|
||||
|
||||
// error missing try
|
||||
catch (x) {
|
||||
|
||||
catch (x) { } // error missing try
|
||||
~~~~~
|
||||
!!! error TS1005: 'try' expected.
|
||||
}
|
||||
|
||||
try { } catch () { } // error missing catch binding
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
}
|
|
@ -2,26 +2,22 @@
|
|||
function fn() {
|
||||
catch(x) { } // error missing try
|
||||
|
||||
finally{ } // potential error; can be absorbed by the 'catch'
|
||||
finally { } // potential error; can be absorbed by the 'catch'
|
||||
|
||||
try { }; // missing finally
|
||||
}
|
||||
|
||||
function fn2() {
|
||||
finally { } // error missing try
|
||||
catch (x) { } // error missing try
|
||||
|
||||
try { } finally { } // statement is here, so the 'catch' clause above doesn't absorb errors from the 'finally' clause below
|
||||
|
||||
// no error
|
||||
try {
|
||||
}
|
||||
finally {
|
||||
}
|
||||
finally { } // error missing try
|
||||
|
||||
catch (x) { } // error missing try
|
||||
|
||||
// error missing try
|
||||
finally {
|
||||
}
|
||||
|
||||
// error missing try
|
||||
catch (x) {
|
||||
}
|
||||
try { } catch () { } // error missing catch binding
|
||||
}
|
||||
|
||||
//// [invalidTryStatements2.js]
|
||||
|
@ -30,6 +26,9 @@ function fn() {
|
|||
}
|
||||
catch (x) { } // error missing try
|
||||
finally { } // potential error; can be absorbed by the 'catch'
|
||||
try { }
|
||||
finally { }
|
||||
; // missing finally
|
||||
}
|
||||
function fn2() {
|
||||
try {
|
||||
|
@ -38,19 +37,14 @@ function fn2() {
|
|||
try {
|
||||
}
|
||||
catch (x) { } // error missing try
|
||||
// no error
|
||||
try { }
|
||||
finally { } // statement is here, so the 'catch' clause above doesn't absorb errors from the 'finally' clause below
|
||||
try {
|
||||
}
|
||||
finally {
|
||||
}
|
||||
// error missing try
|
||||
finally { } // error missing try
|
||||
try {
|
||||
}
|
||||
finally {
|
||||
}
|
||||
// error missing try
|
||||
try {
|
||||
}
|
||||
catch (x) {
|
||||
}
|
||||
catch (x) { } // error missing try
|
||||
try { }
|
||||
catch () { } // error missing catch binding
|
||||
}
|
||||
|
|
|
@ -1,24 +1,20 @@
|
|||
function fn() {
|
||||
catch(x) { } // error missing try
|
||||
|
||||
finally{ } // potential error; can be absorbed by the 'catch'
|
||||
finally { } // potential error; can be absorbed by the 'catch'
|
||||
|
||||
try { }; // missing finally
|
||||
}
|
||||
|
||||
function fn2() {
|
||||
finally { } // error missing try
|
||||
catch (x) { } // error missing try
|
||||
|
||||
try { } finally { } // statement is here, so the 'catch' clause above doesn't absorb errors from the 'finally' clause below
|
||||
|
||||
// no error
|
||||
try {
|
||||
}
|
||||
finally {
|
||||
}
|
||||
finally { } // error missing try
|
||||
|
||||
catch (x) { } // error missing try
|
||||
|
||||
// error missing try
|
||||
finally {
|
||||
}
|
||||
|
||||
// error missing try
|
||||
catch (x) {
|
||||
}
|
||||
try { } catch () { } // error missing catch binding
|
||||
}
|
Loading…
Reference in a new issue