Commit Graph

51 Commits

Author SHA1 Message Date
Konstantin Shcheglov daa6ee6da9 Report NOT_ITERABLE_SPREAD and NOT_MAP_SPREAD.
R=brianwilkerson@google.com

Change-Id: I6668787b5b88d5125852e38bd9d30010e36c354b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97160
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-17 17:27:03 +00:00
Brian Wilkerson 4a7556840f Rename tests ending with Test_Driver
Change-Id: I1b4822630a2508e8a41ba6c5564eae5a54f56622
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96740
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-03-13 13:38:22 +00:00
Paul Berry a2eac98753 Merge HintCodeTest_Driver into HintCodeTest.
This is necessary because the internal code base considers a test file
to fail if it doesn't run any tests.

Alternative fixes considered:

- Put a dummy test in hint_code_test.dart
- Rename hint_code_test.dart to a name that doesn't end in _test.dart

Change-Id: I64fa2be7c76b4d2a85ee9b46ba1a1c21ae2903ae
Reviewed-on: https://dart-review.googlesource.com/c/94800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-02-28 17:50:09 +00:00
Sam Rawlins 9450c6d829 Move SUBTYPE_OF_SEALED_CLASS to own file, and DriverResolutionTest
Change-Id: I1c5372bba522f1c3c818a2a1eafb366794e4700a
Reviewed-on: https://dart-review.googlesource.com/c/93929
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-27 02:08:25 +00:00
Paul Berry c9b1877cbf Disable task model for clients by making WorkItem inconstructible.
The task model is still allowed in analyzer tests since we still have
some unit tests of non-task-model functionality that rely on the task
model to do their testing (see #35734).

Unit tests whose sole purpose was to test the task model have been
removed.  Test files that now empty have been removed.  Non-empty test
files that now contain no tests of their own have had their `main`
functions removed, and have been renamed so that the testing
infrastructure will no longer attempt to run them.

Change-Id: I8b4d0b2dde9337c4e1fe91e443a2c9da6eee8f4f
Reviewed-on: https://dart-review.googlesource.com/c/90720
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-01-24 16:29:17 +00:00
Brian Wilkerson 6c2ea4936a Clean up several deprecation hints
Change-Id: I6191ddc4bb4a98c4976d8bc281b084bfd5073547
Reviewed-on: https://dart-review.googlesource.com/c/89941
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-01-17 01:05:24 +00:00
Konstantin Shcheglov 2beed40848 Move Workspace and its implementations into src/workspace.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I172d95e55ced9925e8f428b9b07f432251ef5248
Reviewed-on: https://dart-review.googlesource.com/c/85462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-11-27 21:50:00 +00:00
Brian Wilkerson 66a12140c7 Delete unused support for dealing with packages
Change-Id: I9cf325693703c04f2fbda143c7c666dc41af9e3d
Reviewed-on: https://dart-review.googlesource.com/c/82466
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-01 20:40:39 +00:00
Konstantin Shcheglov 9c585bf5df Document that ResourceProvider requires absolute, normalized paths, and enforce this.
This allows us to avoid performing normalization, and work with paths
as is. So, this speeds up SourceFactoryImpl.restoreUri() from 7.5% to 3.7%

R=brianwilkerson@google.com

Change-Id: I085f3db40af6543fbb524a82fad48aa051e87937
Reviewed-on: https://dart-review.googlesource.com/77017
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-28 17:18:49 +00:00
Konstantin Shcheglov 1f52372bfa Remove CFE integration from analyzer, analysis_server, and analyzer_cli.
AnalysisDriverResolutionTest is partially updated, about 30 failing
tests added. I will get back to it in a following CL, it is not
directly CFE integration, but updated understanding how we want to
resolve. For example we don't need types for non-expression identifiers.

Change-Id: I3daddbb6c66ffad7a726f3313a1199fd7387aa04
Reviewed-on: https://dart-review.googlesource.com/71883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-29 13:46:45 +00:00
Kevin Millikin f2eaf6aae7 Remove type parameters from the Fasta BodyBuilder
We are pivoting our implementation of FE/Analyzer integration a little
bit, and so the BodyBuilder will not be parameterized in exactly the
same way.  Remove the existing parameterization from it and all the
supporting classes.  This requires specializing the BodyBuilder to the
front end's instantiation of it and deleting the corresponding code in
the Analyzer.

Fixes https://github.com/dart-lang/sdk/issues/33503

Change-Id: I3ddcd2c5f5ebd8f2ff95f2ec8d4c7b98b70a0b0a
Reviewed-on: https://dart-review.googlesource.com/61502
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-06-21 14:53:43 +00:00
danrubel ebcf5bec30 Update Analyzer/CFE type resolution test to use AstBuildingForest
This updates the BodyBuilder to accept a Forest for either Kernel or Analyzer.
More work needs to be done to update the Forest type arguments specified in BodyBuilder.

Change-Id: I595535dc05572515a0b7cca5621de35146944ed3
Reviewed-on: https://dart-review.googlesource.com/54180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-05-08 16:08:52 +00:00
Konstantin Shcheglov 9350925efe Add InvalidCodeTest with end-to-end cases of problematic invalid code.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I39d26ea0b333ddfa69f281eeba78b04212e95a96
Reviewed-on: https://dart-review.googlesource.com/17960
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2017-11-01 18:16:25 +00:00
Konstantin Shcheglov 0549b3160e Run hint tests with Kernel.
R=brianwilkerson@google.com

Bug:
Change-Id: Iea76082755b09015717c19c18a38ffe61072df02
Reviewed-on: https://dart-review.googlesource.com/10201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-02 22:31:38 +00:00
Konstantin Shcheglov f575c099b0 Run all *_driver tests also with Kernel. (attempt #2)
With previous changes that fix finding dart:core on Windows and
flakyness of reporting import errors, I'd like to reland this CL.

Attempt #1: https://dart-review.googlesource.com/c/sdk/+/7624

R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: If5ab2c5ebe2204df6643ee42cbee5b49fb2d8c31
Reviewed-on: https://dart-review.googlesource.com/7961
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-24 18:27:27 +00:00
William Hesse 2274739c3c Revert addition of kernel tests to analyzer unit tests
These tests have flaky failures on the buildbots and commit queue.
Revert "Run all *_driver tests also with Kernel."

This reverts commit d2f887e37b.

Revert "Adjusted status for analyzer/test/generated/strong_mode_kernel_test"

This reverts commit 055654e96d.

Revert "Made status for strong_mode_kernel_test broader (flaky)."

This reverts commit 824c3f56cc.

Bug:
Change-Id: I341762671efc31f168df2f5806653d9548bd43ae
Reviewed-on: https://dart-review.googlesource.com/7708
Reviewed-by: William Hesse <whesse@google.com>
2017-09-22 11:37:21 +00:00
Konstantin Shcheglov d2f887e37b Run all *_driver tests also with Kernel.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I92a0f5f2192c20276b166a9211ab1064bc6f2b82
Reviewed-on: https://dart-review.googlesource.com/7624
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-21 22:44:39 +00:00
Konstantin Shcheglov 50c964b819 Add option for AnalysisDriver to use KernelDriver and KernelResynthesizer.
Run NonErrorResolverTest_Driver tests with this option enabled.
We fail 163 out of 478 tests, or 35%.

R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: Iac6154a14a1357fe239b0140f9f66de792825693
Reviewed-on: https://dart-review.googlesource.com/6340
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-18 02:09:14 +00:00
Brian Wilkerson e454986288 Add code to run more tests from test_all
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2968233002 .
2017-07-06 12:24:01 -07:00
Dan Rubel d566906167 cleanup unused incremental resolution
* remove unused analyzer incremental resolution
* remove unused Token.applyDelta method

Patch Set 1 is the original CL that was landed and reverted
https://codereview.chromium.org/2876993005

Patsh Set 2 contains additional fixes and test changes

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2884853002 .
2017-05-16 07:53:17 -04:00
Dan Rubel d644be82ab Revert "cleanup unused incremental resolution"
This reverts commit 77b383e6b8.

Review-Url: https://codereview.chromium.org/2887443002 .
2017-05-15 11:01:57 -04:00
Dan Rubel 77b383e6b8 cleanup unused incremental resolution
* remove unused analyzer incremental resolution
* remove unused Token.applyDelta method

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2876993005 .
2017-05-15 09:09:25 -04:00
Devon Carew 3fd497b510 Ignore some uses of deprecated APIs.
BUG=

Review-Url: https://codereview.chromium.org/2796483002 .
2017-04-03 08:31:00 -07:00
Paul Berry 5c3ad68f13 Rename parser_test_fasta.dart to parser_fasta_test.dart.
Tests must be named "..._test.dart" in order to be run by the build
bots.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2682753002 .
2017-02-07 11:12:49 -08:00
Paul Berry 62604294a2 Begin hooking up Fasta to analyzer parser tests.
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2672403004 .
2017-02-07 05:45:58 -08:00
P.Y. Laligand 66cda63fea Added support for GN workspaces.
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2651613003 .
2017-01-25 09:26:45 -08:00
Paul Berry c6206ea1de Split "_Driver" tests to separate test files.
This avoids timeouts on my machine.  Also it makes it easier to disable these tests when necessary.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2627293002 .
2017-01-12 08:19:19 -08:00
Konstantin Shcheglov 799296e92b Extract x_Driver tests that time out on Windows bots.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2623253003 .
2017-01-11 11:49:34 -08:00
Konstantin Shcheglov 5455fd0118 Remove 'initializeTestEnvironment' from 'analyzer'.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2399913002 .
2016-10-06 10:18:54 -07:00
Konstantin Shcheglov 175dad4f15 Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2391423003 .
2016-10-06 08:46:35 -07:00
Konstantin Shcheglov 3f6afd8cf5 Add tests for resolveRelativeUri() and a workaround.
The actual problem should be fixed in SDKs Uri implementation.
https://github.com/dart-lang/sdk/issues/27447

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2376073003 .
2016-09-28 13:20:26 -07:00
Konstantin Shcheglov f658a7de42 Remove IncrementalScanner and IncrementalParser.
This code has never been used AFAIK.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2330803002 .
2016-09-11 09:32:13 -07:00
Brian Wilkerson 9c5213a077 Generalize DartSdkManager to support embedder SDKs
R=pquitslund@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2107793002 .
2016-06-28 13:48:57 -07:00
Jaime Wren b7aff9c72f Initial Bazel file resolver support.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2079873002 .
2016-06-17 14:20:55 -07:00
Konstantin Shcheglov 2e4f8a0601 Add missing test suites to the generated/test_all suite.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1878413002 .
2016-04-12 13:18:18 -07:00
Konstantin Shcheglov 7ac77cfedf Refine compound assignment type.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1873913002 .
2016-04-08 12:19:23 -07:00
pq 75b1379a0f Support for line-level error suppression (#25685).
Adds filtering logic to apply source-level error suppression using a simple comment convention.  For example, suppressing an invalid assignment would look like this:

```
//# ignore: invalid_assignment
int x = '';
```

Lists are supported as well:

```
//# ignore: invalid_assignment, const_initialized_with_non_constant_value
const String y = x;
```

Conversation on final format continues (https://github.com/dart-lang/sdk/issues/25685), so this can be treated as provisional but proves out the mechanics.  Comments and concerns most welcome.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1702733002 .
2016-02-16 13:53:58 -08:00
Brian Wilkerson dd0c42cb72 Moved the AST related tests to their new locations
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1612933006 .
2016-01-23 09:45:01 -08:00
Brian Slesinsky 771fea4502 move constant tests to constant_test.dart
BUG=
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org/1616743006 .
2016-01-22 12:44:15 -08:00
Brian Wilkerson 66e07636f4 Moved the tests for the element model into locations corresponding to the implementation
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1529923003 .
2015-12-16 07:49:15 -08:00
Brian Wilkerson f0d249e269 Clean up package imports and library names
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1513643009 .
2015-12-10 08:11:56 -08:00
Konstantin Shcheglov dc13ac659f Fix for DeclarationResolver and invalid getters/setters.
This fixes the following exception:

Caused by The null object does not have a getter 'variable'.

NoSuchMethodError: method not found: 'variable'
Receiver: null
Arguments: []

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1492373002 .
2015-12-03 09:59:00 -08:00
Brian Wilkerson 908708d655 More fixes for failures on the Windows bot
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1266923004 .
2015-08-05 08:13:28 -07:00
pq 2cd5cc0c50 SourceFactoryTest extraction.
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1209773002.
2015-06-24 14:37:05 -07:00
Paul Berry 13c3c10f22 Refactor least upper bound computation; support bottom correctly.
Previously, the least upper bound code was only half-written--it
computed correct results if both types were interface types, and
otherwise returned null.  Now we always return a non-null type.

Unfortunately, the full least upper bound algorithm in the spec
requires referencing types not reachable from the types being
compared; thus in order to execute it we need access to the
TypeProvider.  We can't do this with the existing API.  So that API
has been deprecated.  The new API uses a class TypeSystem which
contains a pointer to the TypeProvider.  This new class should also be
a useful starting point in case we need to make the type system more
pluggable in the future.

Clients that use the old API will see no change in behavior--they will
still get the half-written algorithm.

Still to be addressed in future CL's:
- Deprecate getSmartLeastUpperBound.
- Fix calls to getLeastUpperBound and getSmartLeastUpperBound in analysis
  server.
- Implement least upper bound computation for function types.
- Make sure type parameters function correctly in the presence of F-bounded
  polymorphism.
- Implement shared tests.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1179343004.
2015-06-17 10:10:38 -07:00
paulberry@google.com b9ee97a93f Rename all_the_rest.dart to all_the_rest_test.dart.
So that it will be run by the buildbots.

Also fix a bug which would have caused the test
'DirectoryBasedDartSdkTest.getSdkVersion' to fail when run by the
buildbots.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//762823003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42068 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 16:29:30 +00:00
brianwilkerson@google.com e6686b2993 Move incremental scanner to separate file
R=scheglov@google.com

Review URL: https://codereview.chromium.org//746503002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41856 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 17:54:41 +00:00
scheglov@google.com f551b6964c Extract incremental resolver classes into separate files.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//743543002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41819 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-19 01:18:07 +00:00
scheglov@google.com f13b775902 Translate Engine utilities tests.
This adds 442 more tests.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//674223006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41301 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-25 18:12:37 +00:00
paulberry@google.com febb8f2e22 Split up large resolver_test.dart file.
This splits the four largest classes out of resolver_test.dart
and into their own files.  Hopefully this should help prevent
resolver_test.dart from timing out on the buildbots.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//656543003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41085 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-13 21:43:33 +00:00