From a3422e745dff25e93001ab596c17052aaff6a412 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Tue, 12 Dec 2023 18:37:22 +0000 Subject: [PATCH] Stop depending on analyzer support for Dart <2.12. 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. --- build_resolvers/test/resolver_test.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_resolvers/test/resolver_test.dart b/build_resolvers/test/resolver_test.dart index 3de2f36af..34f441cd2 100644 --- a/build_resolvers/test/resolver_test.dart +++ b/build_resolvers/test/resolver_test.dart @@ -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()); });