Commit graph

294 commits

Author SHA1 Message Date
Daniel Rosenwasser a634e6770a Added tests. 2015-04-16 15:26:59 -07:00
Daniel Rosenwasser c1c608eb1d Added tests. 2015-04-16 15:23:11 -07:00
Yui T 0443bfb45e Merge branch 'master' into conformanceParameterDecl 2015-04-16 14:35:11 -07:00
Yui T 55f9aba855 Move tests with errors to separate file 2015-04-16 14:32:23 -07:00
Yui T 614469462a Update tests files with more conformance from section 6.4 2015-04-16 13:35:56 -07:00
Daniel Rosenwasser fc7be363f1 Added tests from 'captureArguments' branch. 2015-04-16 12:29:49 -07:00
Yui T 2499b3ebd5 Organize test files and add spec description in the comment 2015-04-16 10:21:49 -07:00
Yui T 1d793f4c5e Destructuring assignment and variable declaration 2015-04-14 23:44:14 -07:00
Jason Freeman cb9954bd20 The element/iterated type of any is any 2015-04-14 17:12:53 -07:00
Jason Freeman 5bfbcdcd25 Assignment rest element pretends to get the contextual element type 2015-04-13 17:29:14 -07:00
Jason Freeman f84ebba852 Rest assignment element allows nested destructuring (fixes #2156) 2015-04-13 17:29:11 -07:00
Jason Freeman 2d3b22cbba Disallow binding patterns in binding rest elements (fixes #2519) 2015-04-13 17:21:19 -07:00
Yui T b29077a19b Add destructuring parameter with generic 2015-04-13 12:57:50 -07:00
Yui T 5039b4becb Conformance test for 3.8.2.2 and 6.4 2015-04-12 16:03:16 -07:00
Ron Buckton 042b96592a Merge branch 'master' into fixArrowBindingPattern 2015-04-10 09:54:13 -07:00
Daniel Rosenwasser ad477c7fc9 Merge pull request #2691 from Microsoft/isRegExpWeHardlyKnewYe
Remove 'Symbol.isRegExp' and introduce 'RegExp.prototype.flags'
2015-04-10 01:51:59 -07:00
Ron Buckton 19695f9bca Simplified lookahead and added ES6 test cases 2015-04-09 17:45:45 -07:00
Daniel Rosenwasser c25170558e Added test for super method calls in ES6 classes. 2015-04-09 16:06:26 -07:00
Daniel Rosenwasser 8aeff70e48 Fix a test so that we don't get duplicate declaration errors. 2015-04-09 14:14:55 -07:00
Daniel Rosenwasser 33028d5199 Replace uses of 'Symbol.isRegExp' with 'Symbol.toPrimitive'. 2015-04-09 14:06:57 -07:00
Jason Freeman d459c59028 Merge branch 'master' of https://github.com/Microsoft/TypeScript into iteratorSpreadDestructure 2015-04-08 16:14:24 -07:00
Cyrus Najmabadi b363a459ff Add support for semicolons in class bodies 2015-03-31 14:29:45 -07:00
Cyrus Najmabadi f7aaf09603 Add support for parsing and emitting class expressions. 2015-03-31 13:54:43 -07:00
Jason Freeman 197a42a692 Optimize direct Iterable reference in getIteratedType 2015-03-25 18:38:14 -07:00
Jason Freeman e1f2fbff63 Add tests for array destructuring of iterables 2015-03-25 18:04:11 -07:00
Jason Freeman 4a0af76064 Add tests for iterator spread in call 2015-03-25 18:03:45 -07:00
Jason Freeman 376574d1be Add tests for iterator spread in an array literal 2015-03-25 18:03:42 -07:00
Mohamed Hegazy d47445b175 Merge branch 'exportEquals' of https://github.com/Microsoft/TypeScript into exportEquals 2015-03-23 12:37:41 -07:00
Anders Hejlsberg e63854b40e Adding basic tests 2015-03-22 12:18:56 -07:00
Yui T 513b45d101 Merge branch 'master' into emitClass
Conflicts:
	src/compiler/checker.ts
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/emitter.ts
	src/compiler/parser.ts
2015-03-16 15:55:57 -07:00
Yui T 91c5bae6e5 Address code review 2015-03-16 15:41:51 -07:00
Yui T 2c7ea7f6b2 Update Baselines 2015-03-16 14:28:29 -07:00
Caitlin Potter 10925c1e9b Make sure arrow function grammar rules can deal with type annotations 2015-03-14 19:51:42 -04:00
Caitlin Potter 231f522d89 Add additional test-cases for arrow function grammar
As suggested by @DanielRosenwasser
2015-03-14 19:50:55 -04:00
Caitlin Potter 84634ac25d Disallow line terminator after arrow function parameters, before =>
Closes #2282
2015-03-14 19:50:24 -04:00
Yui T af05afdc50 Emit Super as super 2015-03-12 16:34:06 -07:00
Yui T 800c523f4f Clean up redundant tests 2015-03-12 16:02:43 -07:00
Yui T 0672923323 Parse classDeclaration in strict mode code for ES6 2015-03-12 15:19:45 -07:00
Yui T 56839604da Disallow refering to static property in computed property name 2015-03-12 08:40:09 -07:00
Yui T 7ee587c43f Emit class with export and export default 2015-03-11 16:45:55 -07:00
Yui T a0a506b11b Emit class declaration with static property assignment 2015-03-11 16:13:08 -07:00
Yui T da12d465d0 Add tests for extension, type arguments, overload 2015-03-10 19:11:07 -07:00
Yui T 890aa4a84d test cases for constructor overload, non-static property assignment, getter/setter, method, static method, 2015-03-10 17:39:13 -07:00
Daniel Rosenwasser 7212912307 Merge pull request #2169 from Microsoft/withANameLikeUnicodeYoudThinkThereWouldntBeSoManyWaysToDoIt
Add support for extended Unicode escape sequences in strings and templates
2015-03-03 12:16:42 -08:00
Jason Freeman 7dd7b43448 Add one more test 2015-03-02 13:53:59 -08:00
Jason Freeman cb97686496 Add tests for scoping 2015-03-01 18:16:20 -08:00
Jason Freeman 3de73e6a1f Merge branch 'master' of https://github.com/Microsoft/TypeScript into for-ofES6
Conflicts:
	src/compiler/checker.ts
	tests/baselines/reference/constDeclarations-errors.errors.txt
2015-02-28 16:30:10 -08:00
Vladimir Matveev 7be2e50fb3 merge with master 2015-02-26 21:47:18 -08:00
Jason Freeman 84a22be433 Add a few more tests 2015-02-26 18:17:58 -08:00
Jason Freeman f8150d3734 Support assignment patterns in 'for...of' statements 2015-02-26 18:17:54 -08:00
Jason Freeman 00408a68d3 Add tests for for-of destructuring 2015-02-26 18:17:44 -08:00
Jason Freeman f3543b718f In ES6, an Iterable should contextually type an array literal 2015-02-26 18:17:41 -08:00
Jason Freeman 034bd09526 Add tests for circular references in for...of loops 2015-02-26 18:17:35 -08:00
Jason Freeman 0049b21d6c Check for assignability to the relevant iteratable type 2015-02-26 18:17:31 -08:00
Jason Freeman 732637dd54 Fix getIteratedType to work with 'any' at all levels 2015-02-26 18:17:28 -08:00
Jason Freeman 057108646d More tests 2015-02-26 18:17:25 -08:00
Jason Freeman 3d5c113bee Iterator tests 2015-02-26 18:17:21 -08:00
Jason Freeman ec9e563238 Add tests and accept correct baselines 2015-02-26 18:17:08 -08:00
Jason Freeman aa06622695 Basic tests 2015-02-26 18:17:02 -08:00
Daniel Rosenwasser 6ad1780518 Added tests and updated baselines. 2015-02-26 13:51:51 -08:00
Daniel Rosenwasser 1e602def5b Merge branch 'master' into withANameLikeUnicodeYoudThinkThereWouldntBeSoManyWaysToDoIt 2015-02-26 12:17:31 -08:00
Daniel Rosenwasser 909c367ed8 Added tests for testing escapes. 2015-02-25 17:51:42 -08:00
Daniel Rosenwasser f16e875966 Added tests for escapes in strings, regexes, and templates. 2015-02-25 14:01:07 -08:00
Vladimir Matveev def6812fac merge with master 2015-02-24 22:01:08 -08:00
Anders Hejlsberg ca92653aba Addressing CR feedback 2015-02-21 19:33:53 -08:00
Anders Hejlsberg 95b3d6be58 Adding test 2015-02-21 12:41:20 -08:00
Daniel Rosenwasser ec678f3ebd Merge branch 'master' into thanksLua
Conflicts:
	src/compiler/emitter.ts
	tests/baselines/reference/computedPropertyNames12_ES5.errors.txt
	tests/baselines/reference/computedPropertyNames14_ES5.errors.txt
	tests/baselines/reference/computedPropertyNames15_ES5.errors.txt
	tests/baselines/reference/computedPropertyNames17_ES5.errors.txt
	tests/baselines/reference/computedPropertyNames32_ES5.errors.txt
	tests/baselines/reference/computedPropertyNames35_ES5.errors.txt
	tests/baselines/reference/computedPropertyNames3_ES5.errors.txt
	tests/baselines/reference/computedPropertyNames42_ES5.errors.txt
	tests/baselines/reference/computedPropertyNames5_ES5.errors.txt
	tests/baselines/reference/computedPropertyNames6_ES5.errors.txt
	tests/baselines/reference/computedPropertyNames8_ES5.errors.txt
	tests/baselines/reference/computedPropertyNames9_ES5.errors.txt
	tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.errors.txt
	tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5.errors.txt
	tests/baselines/reference/computedPropertyNamesOnOverloads_ES5.errors.txt
2015-02-20 16:44:20 -08:00
Daniel Rosenwasser ce85b14589 Made the initial object literal properties indented. 2015-02-19 13:11:59 -08:00
Vladimir Matveev b4c82c9401 added tests, accepted baselines 2015-02-17 17:04:31 -08:00
Jason Freeman ac829a8384 Error for naming an interface 'symbol' 2015-02-16 10:44:30 -08:00
Jason Freeman 18276e5267 Address feedback from @yuit 2015-02-10 16:13:28 -08:00
Jason Freeman 35604426c8 Declaration emit for symbol properties 2015-02-06 21:32:54 -08:00
Jason Freeman 4c09ccd60e Check that Symbol properties are proper, and support downlevel type checking 2015-02-06 21:32:51 -08:00
Jason Freeman d07ed679a0 Support indexing with known symbols 2015-02-06 21:32:40 -08:00
Jason Freeman df826de042 symbols in type guards 2015-02-06 21:32:37 -08:00
Jason Freeman 9f39a5388a Make Symbol the apparent type of symbol 2015-02-06 21:32:33 -08:00
Jason Freeman fbeadbcbd3 Add test for new Symbol() 2015-02-06 21:32:30 -08:00
Jason Freeman 2d1647485c Fix expression checking for symbols 2015-02-06 21:32:20 -08:00
Jason Freeman ebdd96bacf Update tests to use new symbol keyword 2015-02-06 21:32:05 -08:00
Jason Freeman 779661c8da Add tests for symbol properties 2015-02-06 21:31:54 -08:00
Jason Freeman b60fa1467f Add tests for operators with symbol operand 2015-02-06 21:31:51 -08:00
Jason Freeman 9cb38fb5f2 Create global Symbol type 2015-02-06 21:31:44 -08:00
Daniel Rosenwasser 657d465398 Added ES5 tests for computed properties. 2015-02-03 17:43:31 -08:00
Daniel Rosenwasser f416cb01c1 Explicitly specify ES6 target in computed property test file names. 2015-02-03 15:28:12 -08:00
Yui T d5b953d3f6 Add testcases 2015-01-28 16:17:13 -08:00
Yui T 15b05e632d Merge branch 'master' into emitArrowFunctionES6 2015-01-27 13:40:19 -08:00
Yui T f219a2de25 Address code review; preserve users non-parenthesis 2015-01-26 19:00:38 -08:00
Jason Freeman f7a8ba28ff Use isTypeOfKind in computed property checks 2015-01-21 17:01:42 -08:00
Jason Freeman de5aa6c0d2 Fix source map scope name for computed properties 2015-01-21 11:01:05 -08:00
Yui T 581beb58dc Merge branch 'master' into emitArrowFunctionES6 2015-01-21 10:36:32 -08:00
Jason Freeman eb7798fbb2 Skip computed properties on declaration emit 2015-01-20 18:29:04 -08:00
Jason Freeman 85219ee5e1 Check computed properties against indexers in classes 2015-01-20 17:07:55 -08:00
Jason Freeman 89f36bb9c5 Disallow computed properties referencing type parameters from containing type 2015-01-19 18:44:15 -08:00
Jason Freeman b5349a5038 Disallow super and fix this capturing for computed properties 2015-01-19 16:37:17 -08:00
Jason Freeman 4cc2722700 Disallow this in computed properties in classes 2015-01-19 16:37:10 -08:00
Jason Freeman 1973b42946 Indexers in object literals include computed property types 2015-01-19 16:37:03 -08:00
Jason Freeman 1b35a1be25 Contextual typing for computed properties 2015-01-19 16:37:00 -08:00
Jason Freeman 96b5f1fe43 Add tests for classes, methods, accessors with computed properties 2015-01-19 16:36:53 -08:00
Jason Freeman 4ac2b4b9c8 Add tests for object literals with computed properties 2015-01-19 16:36:43 -08:00
Daniel Rosenwasser 5bcb52f9b0 Merge pull request #1676 from Microsoft/disallowOptionalBindingParameters
Disallow optional destructured parameters in implementation signatures.
2015-01-15 16:55:14 -08:00
Yui T 6d678b7d4f Merge branch 'master' into addTestsForRestAndDefault 2015-01-15 13:57:25 -08:00
Daniel Rosenwasser dafe7c8958 Added tests. 2015-01-14 17:02:31 -08:00
Daniel Rosenwasser 61e2eb6b89 Renamed tests. 2015-01-14 16:13:12 -08:00
Daniel Rosenwasser f58e6fc4a1 Fixed incorrect tests. 2015-01-14 16:08:29 -08:00
Daniel Rosenwasser b434ee42a8 Added tests. 2015-01-13 16:06:34 -08:00
Yui T cb48a5e110 Add testcases 2015-01-09 16:16:39 -08:00
Arnavion d07151f87c Update tests and baselines. 2015-01-06 15:28:06 -08:00
Arnavion 4dfb0cc3d8 Update tests and baselines. 2015-01-06 02:42:22 -08:00
Jason Freeman 7459c87265 Merge branch 'release-1.4'
Conflicts:
	bin/lib.core.es6.d.ts
	bin/lib.es6.d.ts
	bin/tsc.js
	bin/typescript.d.ts
	bin/typescriptServices.d.ts
	bin/typescriptServices.js
	bin/typescriptServices_internal.d.ts
	bin/typescript_internal.d.ts
2015-01-05 15:08:17 -08:00
Yui T ec5c115cfa Add tests covering emitting rest parameters natively in ES6 2015-01-05 13:33:44 -08:00
Yui T 22bf60e431 Add tests covering emitting default parameters natively in ES6 2015-01-05 13:22:43 -08:00
Daniel Rosenwasser 17c822966d Added tests for erroneous function expressions in both tagged/untagged template expressions. 2014-12-15 16:39:12 -08:00
Anders Hejlsberg 3e436c5047 Adding new tests 2014-12-12 14:34:12 -08:00
Anders Hejlsberg b416cbc599 Merge branch 'master' into spreadAndRest
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/parser.ts
2014-12-12 14:32:53 -08:00
Anders Hejlsberg 86a9c80ff8 Adding tests and accepting new baselines 2014-12-12 10:56:22 -08:00
Daniel Rosenwasser 9ad6eb21ed Merge pull request #1341 from Microsoft/escapingTheTemplateOfDoom
Template string escaping fixes
2014-12-10 16:29:00 -08:00
Anders Hejlsberg 816abb19e4 Merge branch 'master' into destructuring
Conflicts:
	src/compiler/checker.ts
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/emitter.ts
	src/compiler/parser.ts
	src/compiler/types.ts
	src/services/navigationBar.ts
	tests/baselines/reference/assignmentLHSIsValue.errors.txt
	tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt
	tests/baselines/reference/parserErrorRecovery_ParameterList2.errors.txt
2014-12-03 16:43:01 -08:00
Anders Hejlsberg 65d1510769 Adding rudimentary tests 2014-12-02 16:23:37 -08:00
Daniel Rosenwasser 4c4e5a43e0 Added multiline tests. 2014-12-02 13:54:10 -08:00
Daniel Rosenwasser ddb3ca0f48 Augment escapeString to fix downlevel template literal emit. 2014-12-01 17:27:11 -08:00
Daniel Rosenwasser 9da7287eaa Merge pull request #1275 from Microsoft/unterminator
Keep track of unterminated literal expressions.
2014-12-01 12:57:33 -08:00
Yui T 7ec49fd80e Merge branch 'master' into binaryIntegerLiteral
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/emitter.ts
	tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt
2014-12-01 11:22:37 -08:00
Yui T db51fbd65c Add check and testcases for invalid binary digits and octal digits 2014-11-29 17:03:38 -08:00
Cyrus Najmabadi 29ced53a4d Add parser tests for let/const. 2014-11-28 14:50:58 -08:00
Daniel Rosenwasser ae384470a4 Tests for terminated/unterminated template strings. 2014-11-26 17:14:08 -08:00
Jason Freeman f6266fc99e Checker refactor for FunctionLike and VariableOrProperty 2014-11-25 16:09:05 -08:00
Jason Freeman 2bc1f4f4fa Update error codes 2014-11-25 16:09:03 -08:00
Jason Freeman 0e864143de Emit tests for computed properties 2014-11-25 16:08:58 -08:00
Cyrus Najmabadi 3b253e9a4a Add an _es6 suffix to prevent name collisions. 2014-11-24 22:53:55 -08:00
Cyrus Najmabadi 78cd1b5f7e Parser tests for generators and yield expressions. 2014-11-24 22:40:54 -08:00
Yui T 169bc219f2 Merge branch 'binaryIntegerLiteral' of https://github.com/Microsoft/TypeScript into binaryIntegerLiteral 2014-11-24 18:38:03 -08:00
Yui T 5774e64d92 Add test cases 2014-11-23 18:05:21 -08:00
Daniel Rosenwasser f51a42c6de Fixed issue where template expression in call expressions would emit with unnecessary parentheses.
Fixes #1205.
2014-11-19 17:04:34 -08:00
Yui T 1b66ee6f3a Merge branch 'master' into shorthandProperty
Conflicts:
	src/compiler/checker.ts
2014-11-17 11:35:02 -08:00
Yui T 880e958d11 Fix comment 2014-11-14 16:30:03 -08:00
Yui T 03e0722927 Add test cases and rename test files 2014-11-14 15:44:06 -08:00
Yui T bb7a0aa9d9 Add conformance tests 2014-11-11 11:31:45 -08:00
Daniel Rosenwasser bcddb101aa Proper type arg inference with apppropriate overload res tests. 2014-11-05 18:20:40 -08:00
Daniel Rosenwasser 56027663bf Initial work on overload resolution with tagged templates.
Currently type argument inference breaks hard when the first parameter of a tag has a generic type.
2014-11-04 15:05:05 -08:00
Daniel Rosenwasser b8535d339c Omit empty template tail literals. 2014-10-28 18:47:43 -07:00
Daniel Rosenwasser 799609c8e8 Tests for tagged templates. 2014-10-23 17:31:12 -07:00
Daniel Rosenwasser a5b77c65f6 Added tests for tagged templates. Some should fail when we do typechecking. 2014-10-23 16:57:17 -07:00
Daniel Rosenwasser 0d1a46d68c Better test coverage for templates in object literals.
These tests still need to be fixed.
2014-10-23 16:55:35 -07:00
Daniel Rosenwasser c0893e153f Added tests and baselines for templates. 2014-10-23 15:06:05 -07:00