Some tests had some issues migrating to null safety that I
could not immediately hash out, or may warrant some more discussion.
So I've added WithoutNullSafetyMixin, and we can incrementally
migrate these after this CL.
Many tests have little no-op tweaks to make them null safe, like
initializing variables, adding late, making nullable.
Nest steps:
1. Remove `WithNullSafetyMixin` applications.
2. Remove `WithoutNullSafetyMixin` in every position with a TODO for
#44666.
3. For every file with pair(s) of test classes (one pre-null safety,
and one null safety), move around test cases so that they generally
run with null safety, unless they are testing things very specific to
before and after null safety.
Bug: https://github.com/dart-lang/sdk/issues/44666
Change-Id: I0512dedcda42e864fd580af4842702095937bdb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183140
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This includes a small improvement to the validation tests, but there is
also one code whose docs can't be verified without additional work that
I will do in a follow-on CL.
It also includes splitting one code into two to improve the messages.
Change-Id: I52989ca336e42822327e3ac3805b1654d20a479c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125901
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
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>
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>
Some tests have more failures than I feel comfortable marking as failing.
I will triage them in following CLs.
StaticTypeAnalyzer2Test
StrictModeTest
StrongModeDownwardsInferenceTest
StrongModeStaticTypeAnalyzer2Test
TypePropagationTest
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2628743002 .
There are following changes:
1. DEPS to pull in test_reflective_loader 0.0.4
2. Rename runReflectiveTests() to defineReflectiveTests().
3. Remove analyzer's pkg/analyzer/test/reflective_tests.dart
4. Replace reflective_tests.dart imports with package:test_reflective_loader/test_reflective_loader.dart imports.
5. Sort/format and organize imports in the files with imports changes.
6. Fix for a couple of bugs in analysis_server exposed by the new loader.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2298913003 .
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 .