@@ -573,9 +573,7 @@ Future<void> _runExampleProjectBuildTests(Directory exampleDirectory, [File? mai
573
573
// Only verify caching with flutter gallery.
574
574
final bool verifyCaching = exampleDirectory.path.contains ('flutter_gallery' );
575
575
final String examplePath = path.relative (exampleDirectory.path, from: Directory .current.path);
576
- final bool hasNullSafety = File (path.join (examplePath, 'null_safety' )).existsSync ();
577
576
final List <String > additionalArgs = < String > [
578
- if (hasNullSafety) '--no-sound-null-safety' ,
579
577
if (mainFile != null ) path.relative (mainFile.path, from: exampleDirectory.absolute.path),
580
578
];
581
579
if (Directory (path.join (examplePath, 'android' )).existsSync ()) {
@@ -771,16 +769,14 @@ Future<void> _runAddToAppLifeCycleTests() async {
771
769
}
772
770
773
771
Future <void > _runFrameworkTests () async {
774
- final List <String > soundNullSafetyOptions = < String > ['--null-assertions' , '--sound-null-safety' ];
775
- final List <String > mixedModeNullSafetyOptions = < String > ['--null-assertions' , '--no-sound-null-safety' ];
776
772
final List <String > trackWidgetCreationAlternatives = < String > ['--track-widget-creation' , '--no-track-widget-creation' ];
777
773
778
774
Future <void > runWidgets () async {
779
775
printProgress ('${green }Running packages/flutter tests $reset for ${cyan }test/widgets/$reset ' );
780
776
for (final String trackWidgetCreationOption in trackWidgetCreationAlternatives) {
781
777
await _runFlutterTest (
782
778
path.join (flutterRoot, 'packages' , 'flutter' ),
783
- options: < String > [trackWidgetCreationOption, ...soundNullSafetyOptions ],
779
+ options: < String > [trackWidgetCreationOption],
784
780
tests: < String > [ path.join ('test' , 'widgets' ) + path.separator ],
785
781
);
786
782
}
@@ -795,13 +791,13 @@ Future<void> _runFrameworkTests() async {
795
791
// Run release mode tests (see packages/flutter/test_release/README.md)
796
792
await _runFlutterTest (
797
793
path.join (flutterRoot, 'packages' , 'flutter' ),
798
- options: < String > ['--dart-define=dart.vm.product=true' , ...soundNullSafetyOptions ],
794
+ options: < String > ['--dart-define=dart.vm.product=true' ],
799
795
tests: < String > ['test_release${path .separator }' ],
800
796
);
801
797
// Run profile mode tests (see packages/flutter/test_profile/README.md)
802
798
await _runFlutterTest (
803
799
path.join (flutterRoot, 'packages' , 'flutter' ),
804
- options: < String > ['--dart-define=dart.vm.product=false' , '--dart-define=dart.vm.profile=true' , ...soundNullSafetyOptions ],
800
+ options: < String > ['--dart-define=dart.vm.product=false' , '--dart-define=dart.vm.profile=true' ],
805
801
tests: < String > ['test_profile${path .separator }' ],
806
802
);
807
803
}
@@ -817,7 +813,7 @@ Future<void> _runFrameworkTests() async {
817
813
for (final String trackWidgetCreationOption in trackWidgetCreationAlternatives) {
818
814
await _runFlutterTest (
819
815
path.join (flutterRoot, 'packages' , 'flutter' ),
820
- options: < String > [trackWidgetCreationOption, ...soundNullSafetyOptions ],
816
+ options: < String > [trackWidgetCreationOption],
821
817
tests: tests,
822
818
);
823
819
}
@@ -837,9 +833,9 @@ Future<void> _runFrameworkTests() async {
837
833
workingDirectory: path.join (flutterRoot, 'examples' , 'api' ),
838
834
);
839
835
}
840
- await _runFlutterTest (path.join (flutterRoot, 'examples' , 'api' ), options : soundNullSafetyOptions );
841
- await _runFlutterTest (path.join (flutterRoot, 'examples' , 'hello_world' ), options : soundNullSafetyOptions );
842
- await _runFlutterTest (path.join (flutterRoot, 'examples' , 'layers' ), options : soundNullSafetyOptions );
836
+ await _runFlutterTest (path.join (flutterRoot, 'examples' , 'api' ));
837
+ await _runFlutterTest (path.join (flutterRoot, 'examples' , 'hello_world' ));
838
+ await _runFlutterTest (path.join (flutterRoot, 'examples' , 'layers' ));
843
839
}
844
840
845
841
Future <void > runTracingTests () async {
@@ -945,7 +941,6 @@ Future<void> _runFrameworkTests() async {
945
941
946
942
Future <void > runPrivateTests () async {
947
943
final List <String > args = < String > [
948
- '--sound-null-safety' ,
949
944
'run' ,
950
945
'bin/test_private.dart' ,
951
946
];
@@ -989,17 +984,17 @@ Future<void> _runFrameworkTests() async {
989
984
await _runFlutterTest (path.join (flutterRoot, 'dev' , 'tools' , 'gen_defaults' ));
990
985
await _runFlutterTest (path.join (flutterRoot, 'dev' , 'tools' , 'gen_keycodes' ));
991
986
await _runFlutterTest (path.join (flutterRoot, 'dev' , 'benchmarks' , 'test_apps' , 'stocks' ));
992
- await _runFlutterTest (path.join (flutterRoot, 'packages' , 'flutter_driver' ), tests: < String > [path.join ('test' , 'src' , 'real_tests' )], options : soundNullSafetyOptions );
987
+ await _runFlutterTest (path.join (flutterRoot, 'packages' , 'flutter_driver' ), tests: < String > [path.join ('test' , 'src' , 'real_tests' )]);
993
988
await _runFlutterTest (path.join (flutterRoot, 'packages' , 'integration_test' ), options: < String > [
994
989
'--enable-vmservice' ,
995
990
// Web-specific tests depend on Chromium, so they run as part of the web_long_running_tests shard.
996
991
'--exclude-tags=web' ,
997
992
]);
998
- await _runFlutterTest (path.join (flutterRoot, 'packages' , 'flutter_goldens' ), options : soundNullSafetyOptions );
999
- await _runFlutterTest (path.join (flutterRoot, 'packages' , 'flutter_localizations' ), options : soundNullSafetyOptions );
1000
- await _runFlutterTest (path.join (flutterRoot, 'packages' , 'flutter_test' ), options : soundNullSafetyOptions );
1001
- await _runFlutterTest (path.join (flutterRoot, 'packages' , 'fuchsia_remote_debug_protocol' ), options : soundNullSafetyOptions );
1002
- await _runFlutterTest (path.join (flutterRoot, 'dev' , 'integration_tests' , 'non_nullable' ), options : mixedModeNullSafetyOptions );
993
+ await _runFlutterTest (path.join (flutterRoot, 'packages' , 'flutter_goldens' ));
994
+ await _runFlutterTest (path.join (flutterRoot, 'packages' , 'flutter_localizations' ));
995
+ await _runFlutterTest (path.join (flutterRoot, 'packages' , 'flutter_test' ));
996
+ await _runFlutterTest (path.join (flutterRoot, 'packages' , 'fuchsia_remote_debug_protocol' ));
997
+ await _runFlutterTest (path.join (flutterRoot, 'dev' , 'integration_tests' , 'non_nullable' ));
1003
998
const String httpClientWarning =
1004
999
'Warning: At least one test in this suite creates an HttpClient. When\n '
1005
1000
'running a test suite that uses TestWidgetsFlutterBinding, all HTTP\n '
@@ -1234,7 +1229,7 @@ Future<void> _runWebLongRunningTests() async {
1234
1229
'--dart-define=TEST_FLUTTER_ENGINE_VERSION=$engineVersion ' ,
1235
1230
]),
1236
1231
() => _runWebDebugTest ('test/test.dart' ),
1237
- () => _runWebDebugTest ('lib/null_safe_main.dart' , enableNullSafety : true ),
1232
+ () => _runWebDebugTest ('lib/null_safe_main.dart' ),
1238
1233
() => _runWebDebugTest ('lib/web_define_loading.dart' ,
1239
1234
additionalArguments: < String > [
1240
1235
'--dart-define=test.valueA=Example,A' ,
@@ -1247,12 +1242,8 @@ Future<void> _runWebLongRunningTests() async {
1247
1242
'--dart-define=test.valueB=Value' ,
1248
1243
]
1249
1244
),
1250
- () => _runWebDebugTest ('lib/sound_mode.dart' , additionalArguments: < String > [
1251
- '--sound-null-safety' ,
1252
- ]),
1253
- () => _runWebReleaseTest ('lib/sound_mode.dart' , additionalArguments: < String > [
1254
- '--sound-null-safety' ,
1255
- ]),
1245
+ () => _runWebDebugTest ('lib/sound_mode.dart' ),
1246
+ () => _runWebReleaseTest ('lib/sound_mode.dart' ),
1256
1247
() => _runFlutterWebTest (
1257
1248
'html' ,
1258
1249
path.join (flutterRoot, 'packages' , 'integration_test' ),
@@ -1311,7 +1302,6 @@ Future<void> _runFlutterDriverWebTest({
1311
1302
if (driver != null ) '--driver=$driver ' ,
1312
1303
'--target=$target ' ,
1313
1304
'--browser-name=chrome' ,
1314
- '--no-sound-null-safety' ,
1315
1305
'-d' ,
1316
1306
'web-server' ,
1317
1307
'--$buildMode ' ,
@@ -1353,7 +1343,6 @@ Future<void> _runWebTreeshakeTest() async {
1353
1343
'build' ,
1354
1344
'web' ,
1355
1345
'--target=$target ' ,
1356
- '--no-sound-null-safety' ,
1357
1346
'--profile' ,
1358
1347
],
1359
1348
workingDirectory: testAppDirectory,
@@ -1579,7 +1568,6 @@ Future<void> _runGalleryE2eWebTest(String buildMode, { bool canvasKit = false })
1579
1568
'--driver=test_driver/transitions_perf_e2e_test.dart' ,
1580
1569
'--target=test_driver/transitions_perf_e2e.dart' ,
1581
1570
'--browser-name=chrome' ,
1582
- '--no-sound-null-safety' ,
1583
1571
'-d' ,
1584
1572
'web-server' ,
1585
1573
'--$buildMode ' ,
@@ -1686,7 +1674,6 @@ Future<void> _runWebReleaseTest(String target, {
1686
1674
///
1687
1675
/// Instead, we use `flutter run --debug` and sniff out the standard output.
1688
1676
Future <void > _runWebDebugTest (String target, {
1689
- bool enableNullSafety = false ,
1690
1677
List <String > additionalArguments = const < String > [],
1691
1678
}) async {
1692
1679
final String testAppDirectory = path.join (flutterRoot, 'dev' , 'integration_tests' , 'web' );
@@ -1700,11 +1687,6 @@ Future<void> _runWebDebugTest(String target, {
1700
1687
< String > [
1701
1688
'run' ,
1702
1689
'--debug' ,
1703
- if (enableNullSafety)
1704
- ...< String > [
1705
- '--no-sound-null-safety' ,
1706
- '--null-assertions' ,
1707
- ],
1708
1690
'-d' ,
1709
1691
'chrome' ,
1710
1692
'--web-run-headless' ,
@@ -1747,7 +1729,6 @@ Future<void> _runFlutterWebTest(String webRenderer, String workingDirectory, Lis
1747
1729
'--platform=chrome' ,
1748
1730
'--web-renderer=$webRenderer ' ,
1749
1731
'--dart-define=DART_HHH_BOT=$_runningInDartHHHBot ' ,
1750
- '--sound-null-safety' ,
1751
1732
...flutterTestArgs,
1752
1733
...tests,
1753
1734
],
0 commit comments