Add tests and accept baselines

This commit is contained in:
Nathan Shively-Sanders 2015-10-23 13:33:55 -07:00
parent 42d055fdf3
commit 36549572aa
3 changed files with 16 additions and 1 deletions

View File

@ -28,9 +28,10 @@ tests/cases/conformance/types/union/unionTypeCallSignatures.ts(67,12): error TS2
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(68,12): error TS2346: Supplied parameters do not match any signature of call target.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(69,12): error TS2346: Supplied parameters do not match any signature of call target.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(70,12): error TS2346: Supplied parameters do not match any signature of call target.
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(73,12): error TS2346: Supplied parameters do not match any signature of call target.
==== tests/cases/conformance/types/union/unionTypeCallSignatures.ts (30 errors) ====
==== tests/cases/conformance/types/union/unionTypeCallSignatures.ts (31 errors) ====
var numOrDate: number | Date;
var strOrBoolean: string | boolean;
var strOrNum: string | number;
@ -162,4 +163,9 @@ tests/cases/conformance/types/union/unionTypeCallSignatures.ts(70,12): error TS2
~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2346: Supplied parameters do not match any signature of call target.
var unionWithRestParameter4: { (...a: string[]): string; } | { (a: string, b: string): number; };
strOrNum = unionWithRestParameter4("hello"); // error supplied parameters do not match any call signature
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2346: Supplied parameters do not match any signature of call target.
strOrNum = unionWithRestParameter4("hello", "world");

View File

@ -70,6 +70,9 @@ strOrNum = unionWithRestParameter3('hello', 10, 11); // error no call signature
strOrNum = unionWithRestParameter3('hello', "hello"); // error no call signature
strOrNum = unionWithRestParameter3(); // error no call signature
var unionWithRestParameter4: { (...a: string[]): string; } | { (a: string, b: string): number; };
strOrNum = unionWithRestParameter4("hello"); // error supplied parameters do not match any call signature
strOrNum = unionWithRestParameter4("hello", "world");
//// [unionTypeCallSignatures.js]
@ -132,3 +135,6 @@ strOrNum = unionWithRestParameter3('hello', 10); // error no call signature
strOrNum = unionWithRestParameter3('hello', 10, 11); // error no call signature
strOrNum = unionWithRestParameter3('hello', "hello"); // error no call signature
strOrNum = unionWithRestParameter3(); // error no call signature
var unionWithRestParameter4;
strOrNum = unionWithRestParameter4("hello"); // error supplied parameters do not match any call signature
strOrNum = unionWithRestParameter4("hello", "world");

View File

@ -69,3 +69,6 @@ strOrNum = unionWithRestParameter3('hello', 10, 11); // error no call signature
strOrNum = unionWithRestParameter3('hello', "hello"); // error no call signature
strOrNum = unionWithRestParameter3(); // error no call signature
var unionWithRestParameter4: { (...a: string[]): string; } | { (a: string, b: string): number; };
strOrNum = unionWithRestParameter4("hello"); // error supplied parameters do not match any call signature
strOrNum = unionWithRestParameter4("hello", "world");