Convert (and move) some older style completion tests

I found the old style of tests difficult to read and even harder to
debug, so I decided to convert them. Fortunately, a small conversion
program did most of the work.

I didn't change the actual test code except in a couple of places where
the tests were failing because the test code produced diagnostics beyond
those expected for incomplete code (such as unreferenced variables).

As much as possible I kept the original pass/fail sense of the test.
There were a few tests that were failing because the expectations were
just wrong, so in those cases I allowed the test to pass with the right
expectations. I tried to verify the expectations of the tests, but I'm
sure I missed some.

Change-Id: I80b7f914e75012562d3423cc6eb242bb8be11cc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331215
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Brian Wilkerson 2023-10-20 20:32:29 +00:00 committed by Commit Queue
parent 95e1de4f38
commit de04e693c9
4 changed files with 14376 additions and 2452 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -4,6 +4,7 @@
import 'package:test_reflective_loader/test_reflective_loader.dart';
import 'completion_test.dart' as completion;
import 'completion_test_test.dart' as completion_test;
import 'declaration/test_all.dart' as declaration;
import 'location/test_all.dart' as location;
@ -12,6 +13,7 @@ import 'text_expectations.dart';
void main() {
defineReflectiveSuite(() {
completion.main();
completion_test.main();
declaration.main();
location.main();

View file

@ -10,7 +10,6 @@ import 'analysis_server_test.dart' as analysis_server;
import 'benchmarks_test.dart' as benchmarks;
import 'channel/test_all.dart' as channel;
import 'client/test_all.dart' as client;
import 'completion_test.dart' as completion;
import 'domain_analysis_test.dart' as domain_analysis;
import 'domain_completion_test.dart' as domain_completion;
import 'domain_diagnostic_test.dart' as domain_experimental;
@ -41,7 +40,6 @@ void main() {
benchmarks.main();
channel.main();
client.main();
completion.main();
domain_analysis.main();
domain_completion.main();
domain_execution.main();