Commit graph

116 commits

Author SHA1 Message Date
Daniel Rosenwasser
6b77c24753 Merge pull request #3365 from Microsoft/painInTheASI
Parse namespaces/types aliases/interfaces/ambient declarations only when they cannot be legal JS
2015-06-08 10:27:15 -07:00
Anders Hejlsberg
7c2a3c256d Modifying test a bit 2015-06-06 17:54:11 -07:00
Anders Hejlsberg
33517c4635 Adding test as suggested in CR feedback 2015-06-06 17:47:22 -07:00
Anders Hejlsberg
bcdbc98dac Adding simple tests 2015-06-05 14:50:15 -07:00
Cyrus Najmabadi
2bf19e80c3 Speed up tests by not type-checking lib.d.ts unless the test asks for that. 2015-06-04 01:03:02 -07:00
Daniel Rosenwasser
e93b7a75ce Added tests. 2015-06-02 15:42:24 -07:00
Anders Hejlsberg
143fd5d954 New test and baselines 2015-05-30 09:19:10 -07:00
Anders Hejlsberg
5eff0a5fae Adding tests 2015-05-26 12:03:13 -07:00
Anders Hejlsberg
7efd93a965 Adding test 2015-05-02 16:57:18 -07:00
Anders Hejlsberg
a133684b36 Modifying test 2015-05-01 15:03:52 -07:00
Anders Hejlsberg
4a98c4680a Merge pull request #2804 from Microsoft/unionPropertyAccess
Only public properties accessible through union type
2015-04-22 14:16:30 -07:00
Anders Hejlsberg
8182b7132e Adding tests 2015-04-21 11:20:43 -07:00
Anders Hejlsberg
cae274d0d8 Merge branch 'master' into unionPropertyAccess 2015-04-17 17:19:21 -07:00
Jason Freeman
8bf012b566 Add tests for not depending on base types 2015-04-16 18:15:03 -07:00
unknown
0e0cac8ce0 Adding test 2015-04-16 14:41:33 -07:00
Anders Hejlsberg
c91e2855ca Adding test 2015-04-12 10:52:20 -07:00
Caitlin Potter
bd2c239161 Add tests for tuple type compatibility
Tests suggested by @DanielRosenwasser
2015-03-10 13:33:59 -04:00
Dick van den Brink
23f56dadfb Fixed tests due to lib.d.ts changes 2015-03-08 18:59:04 +01:00
Sheetal Nandi
802f11349f Merge pull request #1056 from Microsoft/unionTypeConformance
Union type conformance
2014-12-02 08:02:34 -08:00
Daniel Rosenwasser
c8bb487645 Merge branch 'master' into conformanceTests-624
Conflicts:
	tests/baselines/reference/parameterInitializersForwardReferencing.errors.txt
2014-11-25 14:18:17 -08:00
Sheetal Nandi
ab4ccb3a1c Merge branch 'master' into unionTypeConformance 2014-11-21 01:33:13 -08:00
Sheetal Nandi
9e2eb3bc03 Merge pull request #1058 from Microsoft/contextualUnionTypeConformance
Contextual union type conformance test cases and Fix for contextual union signature
2014-11-06 16:25:40 -08:00
Anders Hejlsberg
d8080a0b46 Merge pull request #1035 from Microsoft/improvedTypeInference
Improved type inference (fixes #1011)
2014-11-04 17:09:31 -08:00
Sheetal Nandi
40af15c8ff Array literal produces union type if the it is not contextually typed 2014-11-04 15:58:44 -08:00
Sheetal Nandi
a5cea935af Tests for contextual index signature of union type
Let S be the set of types in U that has a string index signature. If S is not empty, U has a string index signature of a union type of the types of the string index signatures from each type in S.
Let S be the set of types in U that has a numeric index signature. If S is not empty, U has a numeric index signature of a union type of the types of the numeric index signatures from each type in S.
2014-11-04 15:33:32 -08:00
Sheetal Nandi
c4e632746e Fix the logic in getting the contextual signature of union type as per spec
Fixes #1054
2014-11-04 14:49:15 -08:00
Sheetal Nandi
c5b4051f3a Test cases for contextual typing of union type members 2014-11-04 13:33:43 -08:00
Sheetal Nandi
1ca9273f49 Identity of union type 2014-11-04 13:18:50 -08:00
Sheetal Nandi
16fc7a22e2 Tests for union type literals
A union type literal is written as a sequence of types separated by vertical bars.
UnionType:
PrimaryOrUnionType   |   PrimaryType
A union typle literal references a union type.
When function or constructor types are included in union types they must be enclosed in parentheses
2014-11-04 13:18:47 -08:00
Sheetal Nandi
49b5b5ab99 Tests for union of index signatures:
•	If each type in U has a string index signature, U has a string index signature of a union type of the types of the string index signatures from each type in U.
•	If each type in U has a numeric index signature, U has a numeric index signature of a union type of the types of the numeric index signatures from each type in U.
2014-11-04 13:18:37 -08:00
Sheetal Nandi
c2b2c306af Tests for union of construct signatures
If each type in U has construct signatures and the sets of construct signatures are identical ignoring return types, U has the same set of construct signatures, but with return types that are unions of the return types of the respective construct signatures from each type in U.
2014-11-04 13:18:34 -08:00
Sheetal Nandi
2b8342bd79 Tests for union of call signatures
If each type in U has call signatures and the sets of call signatures are identical ignoring return types, U has the same set of call signatures, but with return types that are unions of the return types of the respective call signatures from each type in U.
2014-11-04 13:18:30 -08:00
Sheetal Nandi
357bd87612 Tests for union members:
If each type in U has a property P, U has a property P of a union type of the types of P from each type in U.
2014-11-04 13:18:27 -08:00
Sheetal Nandi
1f3653b32e Tests for assignment compatibility of union types
•	A union type U is assignable to a type T if each type in U is assignable to T.
•	A type T is assignable to a union type U if T is assignable to any type in U.
2014-11-04 13:18:24 -08:00
Sheetal Nandi
703cd5d4cf Tests for checking if type S is subtype of union type
T is a union type and S is a subtype of at least one constituent type of T
2014-11-04 13:18:20 -08:00
Sheetal Nandi
a1535533e7 Tests for source (S) of subtype is union type (U)
A union type U is a subtype of a type T if each type in U is a subtype of T
2014-11-04 13:18:17 -08:00
Sheetal Nandi
568049474e Tests to check equivalency of union types
A union type encompasses an unordered set of unrelated types (that is, types that aren’t subtypes of each other). The following rules govern union types:
•	A | B is equivalent to A if B is a subtype of A.
•	A | B is equivalent to B | A.
•	AB | C is equivalent to A | BC, where AB is A | B and BC is B | C.
2014-11-04 13:18:14 -08:00
Sheetal Nandi
7634f741d9 Conformance tests for array element type of tuple is union type of tuple element types 2014-11-04 13:18:11 -08:00
Anders Hejlsberg
b3ef9622a7 Addressing CR feedback 2014-11-03 13:50:41 -08:00
Vladimir Matveev
cba9b7ff5e fixed typo 2014-11-02 16:20:00 -08:00
Vladimir Matveev
6b1a96ca29 added basic set of tests for type aliases 2014-11-02 13:34:04 -08:00
Anders Hejlsberg
6b61422e07 Adding tests 2014-11-02 11:14:23 -08:00
Vladimir Matveev
fe7d056724 initial version of spec conformance tests for type aliases 2014-11-01 23:54:55 -07:00
Jason Freeman
47bded060e Specify error message for type argument inference failing 2014-10-22 15:08:18 -07:00
Anders Hejlsberg
152a9402d0 Merge pull request #914 from Microsoft/parensInTypes
Parentheses in type literals
2014-10-20 09:43:07 -07:00
Anders Hejlsberg
f3bd294d0e Adding tests 2014-10-19 07:57:10 -07:00
Anders Hejlsberg
e5872b4824 Addressing CR feedback 2014-10-18 08:37:33 -07:00
Anders Hejlsberg
c00ee42b11 Adding tests 2014-10-16 20:52:36 -07:00
Dan Quirk
8ce1760d9e Fixing merge conflicts 2014-10-10 14:49:35 -07:00
Dan Quirk
bacb9d0b22 Test updates from union changes 2014-10-10 14:41:14 -07:00
Yui T
6dfb60d77c Remove duplicate file 2014-10-06 10:36:54 -07:00
Yui T
52f8ae3eec Tuple conformance 2014-10-03 17:37:29 -07:00
Yui T
c2d86711e8 Update baselines 2014-09-30 18:09:55 -07:00
Mohamed Hegazy
12572576c8 fix comment text 2014-09-23 13:44:39 -07:00
Mohamed Hegazy
a6fdad1e97 Added protected conformance tests 2014-09-23 11:22:38 -07:00
Jason Freeman
cb38c9569a Add a test to make sure types are being checked for privates 2014-09-15 10:54:44 -07:00
Jason Freeman
ba574725c2 Check that private properties originate in the same declaration 2014-09-15 10:54:42 -07:00
Daniel Rosenwasser
f3f3994f25 Added tests. 2014-09-11 14:52:14 -07:00
Jason Freeman
6fb3c34681 Conformance coverage for spec change #589 2014-09-05 18:44:49 -07:00
Jason Freeman
3388f7bd48 Update baselines 2014-08-27 16:58:31 -07:00
Jason Freeman
aa0ae22b37 Update baselines 2014-08-27 10:06:16 -07:00
Jason Freeman
cc20bb19d0 Baseline and harness changes 2014-08-25 10:55:22 -07:00
Jason Freeman
971a4c55d4 Remove problematic test (should be added back after issue #463 is fixed) 2014-08-15 14:37:38 -07:00
Mohamed Hegazy
349367d991 Consolidate logic to use the lib in one location in the tests 2014-08-11 15:35:15 -07:00
Anders Hejlsberg
0550b93635 Allow reserved words in type queries.
Fixes #181.
2014-07-22 15:11:24 -07:00
Mohamed Hegazy
214df64e28 Add snapshot of compiler sources 2014-07-12 17:30:19 -07:00