@@ -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 '
@@ -1229,7 +1224,7 @@ Future<void> _runWebLongRunningTests() async {
1229
1224
() => _runWebDebugTest ('lib/framework_stack_trace.dart' ),
1230
1225
() => _runWebDebugTest ('lib/web_directory_loading.dart' ),
1231
1226
() => _runWebDebugTest ('test/test.dart' ),
1232
- () => _runWebDebugTest ('lib/null_safe_main.dart' , enableNullSafety : true ),
1227
+ () => _runWebDebugTest ('lib/null_safe_main.dart' ),
1233
1228
() => _runWebDebugTest ('lib/web_define_loading.dart' ,
1234
1229
additionalArguments: < String > [
1235
1230
'--dart-define=test.valueA=Example,A' ,
@@ -1242,12 +1237,8 @@ Future<void> _runWebLongRunningTests() async {
1242
1237
'--dart-define=test.valueB=Value' ,
1243
1238
]
1244
1239
),
1245
- () => _runWebDebugTest ('lib/sound_mode.dart' , additionalArguments: < String > [
1246
- '--sound-null-safety' ,
1247
- ]),
1248
- () => _runWebReleaseTest ('lib/sound_mode.dart' , additionalArguments: < String > [
1249
- '--sound-null-safety' ,
1250
- ]),
1240
+ () => _runWebDebugTest ('lib/sound_mode.dart' ),
1241
+ () => _runWebReleaseTest ('lib/sound_mode.dart' ),
1251
1242
() => _runFlutterWebTest (
1252
1243
'html' ,
1253
1244
path.join (flutterRoot, 'packages' , 'integration_test' ),
@@ -1306,7 +1297,6 @@ Future<void> _runFlutterDriverWebTest({
1306
1297
if (driver != null ) '--driver=$driver ' ,
1307
1298
'--target=$target ' ,
1308
1299
'--browser-name=chrome' ,
1309
- '--no-sound-null-safety' ,
1310
1300
'-d' ,
1311
1301
'web-server' ,
1312
1302
'--$buildMode ' ,
@@ -1348,7 +1338,6 @@ Future<void> _runWebTreeshakeTest() async {
1348
1338
'build' ,
1349
1339
'web' ,
1350
1340
'--target=$target ' ,
1351
- '--no-sound-null-safety' ,
1352
1341
'--profile' ,
1353
1342
],
1354
1343
workingDirectory: testAppDirectory,
@@ -1574,7 +1563,6 @@ Future<void> _runGalleryE2eWebTest(String buildMode, { bool canvasKit = false })
1574
1563
'--driver=test_driver/transitions_perf_e2e_test.dart' ,
1575
1564
'--target=test_driver/transitions_perf_e2e.dart' ,
1576
1565
'--browser-name=chrome' ,
1577
- '--no-sound-null-safety' ,
1578
1566
'-d' ,
1579
1567
'web-server' ,
1580
1568
'--$buildMode ' ,
@@ -1681,7 +1669,6 @@ Future<void> _runWebReleaseTest(String target, {
1681
1669
///
1682
1670
/// Instead, we use `flutter run --debug` and sniff out the standard output.
1683
1671
Future <void > _runWebDebugTest (String target, {
1684
- bool enableNullSafety = false ,
1685
1672
List <String > additionalArguments = const < String > [],
1686
1673
}) async {
1687
1674
final String testAppDirectory = path.join (flutterRoot, 'dev' , 'integration_tests' , 'web' );
@@ -1695,11 +1682,6 @@ Future<void> _runWebDebugTest(String target, {
1695
1682
< String > [
1696
1683
'run' ,
1697
1684
'--debug' ,
1698
- if (enableNullSafety)
1699
- ...< String > [
1700
- '--no-sound-null-safety' ,
1701
- '--null-assertions' ,
1702
- ],
1703
1685
'-d' ,
1704
1686
'chrome' ,
1705
1687
'--web-run-headless' ,
@@ -1742,7 +1724,6 @@ Future<void> _runFlutterWebTest(String webRenderer, String workingDirectory, Lis
1742
1724
'--platform=chrome' ,
1743
1725
'--web-renderer=$webRenderer ' ,
1744
1726
'--dart-define=DART_HHH_BOT=$_runningInDartHHHBot ' ,
1745
- '--sound-null-safety' ,
1746
1727
...flutterTestArgs,
1747
1728
...tests,
1748
1729
],
0 commit comments