Skip to content

Commit

Permalink
Stop depending on analyzer support for Dart <2.12. (#3623)
Browse files Browse the repository at this point in the history
It doesn't matter which Dart language version is used by the test
`gives a correct languageVersion based on comments`, since all the
test is doing is confirming that the language version is properly
reflected in the return value of `resolver.libraryFor`. Previously the
test used language version 2.1; it now uses language version 3.1.

This helps unblock removal of legacy (pre-null-safety) support from
the Dart analyzer.
  • Loading branch information
stereotype441 authored Dec 12, 2023
1 parent d885bc9 commit 7368a7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build_resolvers/test/resolver_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ void main() {
group('language versioning', () {
test('gives a correct languageVersion based on comments', () async {
await resolveSources({
'a|web/main.dart': '// @dart=2.1\n\nmain() {}',
'a|web/main.dart': '// @dart=3.1\n\nmain() {}',
}, (resolver) async {
var lib = await resolver.libraryFor(entryPoint);
expect(lib.languageVersion.effective.major, 2);
expect(lib.languageVersion.effective.major, 3);
expect(lib.languageVersion.effective.minor, 1);
}, resolvers: AnalyzerResolvers());
});
Expand Down

0 comments on commit 7368a7a

Please sign in to comment.