Commit graph

70 commits

Author SHA1 Message Date
Anders Hejlsberg 46bddedb4b Add regression tests 2019-09-30 09:28:19 -07:00
Anders Hejlsberg e3d23cc40e Add tests 2019-09-24 06:55:38 -07:00
Anders Hejlsberg c816cf2562 Add additional test 2019-08-16 07:45:02 -07:00
Anders Hejlsberg f929a25407 Add regression test 2019-08-15 10:02:32 -07:00
Anders Hejlsberg ec38799e2a Add more tests 2019-07-26 13:17:00 -07:00
Anders Hejlsberg b9d27c0f2c Add regression tests 2019-07-25 11:52:08 -07:00
Anders Hejlsberg d96d16e10b Add additional test 2019-07-20 10:01:59 -07:00
Anders Hejlsberg ae1add7210 Update tests 2019-07-17 15:02:20 -07:00
Anders Hejlsberg 7d4259ba9f Update tests 2019-07-17 14:57:26 -07:00
Anders Hejlsberg 9cc9fb9bd7 Update tests 2019-06-09 08:00:01 -07:00
Ron Buckton 26fd6dafa6 Relate a source type that is sufficiently covered by a target discriminated union 2019-04-29 15:46:37 -07:00
Anders Hejlsberg a764729b38 Add tests 2019-04-10 17:42:08 -10:00
Anders Hejlsberg cd646dab7e Add tests 2019-04-06 07:59:39 -10:00
Anders Hejlsberg 35cf397ae3 Add regression tests 2019-02-10 15:29:14 -08:00
Anders Hejlsberg 4ae0848bd4 Add tests 2018-12-05 15:20:21 -08:00
Anders Hejlsberg 4bb5cfb9bb Add regression test 2018-09-25 18:17:21 -07:00
Anders Hejlsberg c48c3632bd Update tests 2018-08-29 14:02:15 -07:00
Wesley Wigham eaabf920eb
Combine keyof T inferences (#22525)
* Combine keyof T inferences

* Extract covariant inference derivation into function

* Test:keyof inference lower priority than return inference

for #22376

* Update 'expected' comment in keyofInferenceLowerPriorityThanReturn

* Update comment in test too, not just baselines

* Fix typo

* Move tests
2018-03-19 16:56:51 -07:00
Wesley Wigham e684f30d18
Fix build in the presence of definite assignment analysis (#20170) 2017-11-20 14:49:15 -08:00
Anders Hejlsberg 3d153e2ac3 Add tests 2017-11-19 09:50:45 -08:00
Anders Hejlsberg 16b68ff25b Fix typo 2017-11-10 13:46:51 -08:00
Anders Hejlsberg d15926d9c7 Add test 2017-11-10 13:13:32 -08:00
Nathan Shively-Sanders b228736596 Merge branch 'master' into 6229-known-length-tuples 2017-11-01 11:51:49 -07:00
Anders Hejlsberg 414f165df0 Add tests 2017-10-23 12:36:44 -07:00
Tycho Grouwstra 1f77317b64 add strictTuples flag giving tuples known length 2017-08-20 02:54:26 +08:00
Anders Hejlsberg 61223f2ab0 Add tests 2017-06-06 13:26:51 -07:00
Nathan Shively-Sanders 0b911d5648 Improve comments in source and tests 2017-05-24 13:52:29 -07:00
Anders Hejlsberg 3cda0eac32 Update tests 2017-04-10 17:14:22 -10:00
Anders Hejlsberg 510bc81967 Add another test case 2017-04-10 07:33:08 -10:00
Anders Hejlsberg 50f84b12a2 Add tests 2017-04-08 14:19:25 -07:00
Daniel Rosenwasser d22f4fb513 Added a test. 2016-12-30 12:14:31 -05:00
Daniel Rosenwasser ffed2484d3 Added tests. 2016-11-12 12:46:01 -08:00
Yui f235bf7db8 [Transforms] Merge master 06/06/2016 (#8991)
* Remove check narrowing only certain types, add test showing issues with this

* string literal case test

* Reconcile fix with CFA work

* Defaultable -> NotNarrowable to align with use

* Missed a defaultable in comments

* Add test for narrowing to unions of string literals

* Rewrite isInStringLiteral to accomodate for unterminated strings

* Refactor signatureHelp to expose helper functions

* Add support for completion in string literals

* Remove unused check

* Use const instead of let

* Fix error

* Formatting changes

* Use shorthand properties

* Add failing test for #8738

* Sort baseline reference identifier by name

* Detects assignment to internal module export clause, fixes #8738

* add SharedArrayBuffer

fix

* Factor out assignment op check

* Add test for composite assignment

* Factor out the behaviour and handles x++ and ++x

* Handles ES3 default as identifier name

* Fix missing else statement

* isNameOfExportedDeclarationInNonES6Module

* Reorder options alphabetically

* Mark diagnostics, and skipDefaultLibCheck as internal

* Allow an import of "foo.js" to be matched by a file "foo.ts"

* Improve loadModuleFromFile code

* Respond to PR comments

* Respond to more PR comments

* Fix test

* Actually merge from master

* Revert to old tryLoad implementation

* Run fixupParentReferences when parsing isolated jsDocComment

* initial revision of unit test support for project system in tsserver

* Allow wildcard ("*") patterns in ambient module declarations

* Add non-widening forms of null and undefined

* Create separate control flows for property declarations with initializers

* Add regression test

* Allow trailing commas in function parameter and argument lists

* Add tests

* Remove unused variable

* Add null check and CR feedback

* Support shorthand ambient module declarations

* Revert "Merge pull request #7235 from weswigham/narrow-all-types"

This reverts commit ef0f6c8fe4, reversing
changes made to 9f087cb62a.

* reuse the fixupParentReferences function

* Improve typing of && operator with --strictNullChecks

* Add test

* Respond to PR comments

* Respond to PR comments

* Add merging tests

* Use a function `stringify` to simplify calls to `JSON.stringify(xyz, undefined, 2)`

* Update tests

* Fix mistake

* Include indent in navigation bar protocol

Previously navbar01 test had indents when run in the browser but not when run from node. Now they run the same.

* Remove unnecessary restrictions in property access narrowing

* Fix fourslash test

* Add regression test

* Consider property declarations to be control flow containers

* Adding regression test

* Remove restriction on --target es5 and --module es6

* change type definition for Object.create

* Fix signature help

* Add "implicit any" warning for shorthand ambient modules

* Remove trailing whitespace

* Support using string values in enums for CompilerOptions in transpile methods

* Remove trailing whitespace in jakefile

* Make `jake runtests-browser` support test regexes with spaces

For example: `jake runtests-browser t="transpile .js files"` now works.

* Add another test

* factor out isJsxOrTsxExtension

* Move to a conformance test

* Revert "Revert "Merge pull request #7235 from weswigham/narrow-all-types""

This reverts commit fc3e040c51.

* Use inclusive flag, as originally done, but include almost everything

* Add additional tests

* Respond to PR comments

* Fix typo

* add tests for tsserver project system

* Fix test

* Allow case comparison to undefined and null in strict null checking mode

* Remove incorrectly added tests

* check if moduleResolution when verifying that program can be reused

* more tests for module resolution change and exclude

* Fix linting issues

* Merge JSDoc of assignments from function expressions

* Allow nested assignments in type guards

* Add tests

* Improve order of parameter's merged jsdoc

* Force LF newlines for LKG builds/non debug builds
Fixes 6630

* Create intersection types in type guards for unrelated types

* Split commentsFunction test into expr/decl

And renumber.

* Remove TODO comments

* Accept new baselines

* Add tests

* Remove comments

* Fix test helper

* Recognize relative path using in outDir property (#9025)

* Recognize relative path using in outDir property

* Add projects tests

* Add project .json files

* Update baselines

* Add comments

* Add test case

The test passes in 1.8 and fails in master.

* Return trace when exception happens

* Remove Long-Done TODO

AFAIK, the harness sources have been concatenated into `run.js` for as long as I've known. This stops executing them twice (and in turn makes debugging tests much easier, since you no longer have to debug into eval'd code).

* Allow primitive type guards with typeof on right

Previously, only type guards of the form `typeof x === 'string'` were
allowed. Now you can write `'string' === typeof x`.

* Primitive type guards are now order independent

* Fix comments in tests

* Add handleing for classes

* Add more tests for target=es5 module=es6

* addExportToArgumentListKind

* Accept baseline

* Add more tests

* wip-fixing transforms

* Adds progress indicators to the runtests-parallel build task.

* Fixed typo

* Fix comment

* Add test for out-of-range error

* Use proper method of not resolving alias

* Fix module loading error

(commandLineOptions_stringToEnum would be undefined if optionDeclarations wasn't loaded yet)

* Port 8739

* Update tests

* Update baselines

* Contextually type return statement in async function

* Remove stale files

* Undo change

* Improve perf

* Improve tests

* Fix sourcemaps for debugging tests

* Allow --sourceRoot with --inlineSources option
Fixes #8445

* this in parameter initializers resolves to class

Accept baselines now that the test passes.

* Add tests for more kinds of import/export

* Fix7334 Disallow async in functionExpression and ArrowFunction (#9062)

* Error when using async modifier in function-expression and arrow-function when target es5

* Add tests and baselines

* Resolve function-this in parameter initialisers when explicitly provided

* Allow null/undefined guard with null/undefined on left

Also add a test with baselines.

* Code review comments

* Update more diagnostic messages ES6->2015

Fix #8996 CC @mhegazy.

* Fixes an issue with runtests-parallel when global mocha is not installed.

* Update LKG

* Add tests

* fix baselines

* Recommend runtests-parallel in CONTRIBUTING

* Only inlineSourceMap when debugging through jake-browser (#9080)

* Only inlineSourceMap when debugging through jake-browser

* Address PR: fix typo in opt's property

* Manually port tests from PR 8470

* minor fix: add missing return clause

* Support using string values in enums for CompilerOptions in transpile methods

* Support using string values in enums for CompilerOptions in transpile methods

# Conflicts:
#	tests/cases/unittests/transpile.ts

* Fix test helper

* Add test for out-of-range error

* Fix module loading error

(commandLineOptions_stringToEnum would be undefined if optionDeclarations wasn't loaded yet)

* Use camel-case instead of snake-case (#9134)

* Manually add tests for PR 8988

* Allow wildcard ("*") patterns in ambient module declarations

* Respond to PR comments

* Add another test

* Improve perf

* Improve tests

* Update baseline from merging with master

* Address PR comment

* Update baseline

* Refactor how we retrieve binding-name cache in module transformer

* Temporary accept so we get a clean run-tests result
2016-06-14 11:36:57 -07:00
Yui f619282af1 [Transforms] Update transforms with recent master (#8960)
* Remove check narrowing only certain types, add test showing issues with this

* string literal case test

* Reconcile fix with CFA work

* Defaultable -> NotNarrowable to align with use

* Missed a defaultable in comments

* Add test for narrowing to unions of string literals

* Actually merge from master

* Run fixupParentReferences when parsing isolated jsDocComment

* initial revision of unit test support for project system in tsserver

* Add non-widening forms of null and undefined

* Create separate control flows for property declarations with initializers

* Add regression test

* Add tests

* Remove unused variable

* Add null check and CR feedback

* Revert "Merge pull request #7235 from weswigham/narrow-all-types"

This reverts commit ef0f6c8fe4, reversing
changes made to 9f087cb62a.

* reuse the fixupParentReferences function

* Fix up error from merging with master
2016-06-03 11:02:35 -07:00
Nathan Shively-Sanders 5138e8be8e Correct tests and update baselines.
A lot of tests used non-numeric property names for object literals that
are contextually typed only by a numeric indexer.
2016-05-25 11:37:10 -07:00
Anders Hejlsberg e828fce952 Adding tests 2016-05-03 17:05:23 -07:00
Anders Hejlsberg b1e9f43d28 Merge branch 'master' into controlFlowTypes
Conflicts:
	src/compiler/checker.ts
	tests/baselines/reference/typeAssertions.errors.txt
2016-04-10 09:30:30 -07:00
Daniel Rosenwasser a3faca57d0 Merge branch 'master' into comparableRelation 2016-03-30 01:01:02 -07:00
Anders Hejlsberg 0820249e71 Fixing some tests 2016-03-26 08:20:06 -07:00
Anders Hejlsberg a0842aaf04 Adding tests 2015-11-20 10:08:00 -08:00
Daniel Rosenwasser 0a706c4780 Merge branch 'master' into comparableRelation
Conflicts:
	src/compiler/checker.ts
2015-11-05 15:48:40 -08:00
Daniel Rosenwasser 5cb95d4044 Renamed test directory. 2015-10-29 16:40:34 -07:00
Daniel Rosenwasser 262352ec5b Added tests on intersection types. 2015-10-28 17:10:52 -07:00
Daniel Rosenwasser 002bb6f04b Added tests. 2015-10-27 17:38:53 -07:00
Vladimir Matveev bc02341e99 addressed PR feedback, updated tests to suppress reachability errors where they are not needed 2015-10-13 10:58:55 -07: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 1ca9273f49 Identity of union type 2014-11-04 13:18:50 -08:00