[flutter_tools] support --enable-experiment in flutter test (#55564)

Support --enable-experiment in flutter test (for flutter_tester). Required minor change for null safety.
This commit is contained in:
Jonah Williams
2020-04-27 14:47:43 -07:00
committed by GitHub
parent 07c451fea9
commit 1ab3878996
12 changed files with 65 additions and 8 deletions

View File

@@ -480,6 +480,9 @@ Future<void> _runFrameworkTests() async {
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_localizations'), tableData: bigqueryApi?.tabledata);
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_test'), tableData: bigqueryApi?.tabledata);
await _runFlutterTest(path.join(flutterRoot, 'packages', 'fuchsia_remote_debug_protocol'), tableData: bigqueryApi?.tabledata);
await _runFlutterTest(path.join(flutterRoot, 'dev', 'integration_tests', 'non_nullable'),
options: <String>['--enable-experiment=non-nullable'],
);
await _runFlutterTest(
path.join(flutterRoot, 'dev', 'tracing_tests'),
options: <String>['--enable-vmservice'],

View File

@@ -3,3 +3,4 @@
analyzer:
exclude:
- lib/main.dart
- test/test_test.dart

View File

@@ -0,0 +1,14 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart=2.9
import 'package:flutter_test/flutter_test.dart';
String? x;
void main() {
testWidgets('trivial', (WidgetTester tester) async {
expect(true, true);
});
}