Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
0c796599
Unverified
Commit
0c796599
authored
Nov 12, 2020
by
Jonah Williams
Committed by
GitHub
Nov 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] make most integration tests null safe (#70334)
parent
b5a4d089
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
32 additions
and
29 deletions
+32
-29
background_project.dart
.../test/integration.shard/test_data/background_project.dart
+2
-2
basic_project.dart
...tools/test/integration.shard/test_data/basic_project.dart
+5
-3
gen_l10n_project.dart
...ls/test/integration.shard/test_data/gen_l10n_project.dart
+2
-0
hot_reload_const_project.dart
...integration.shard/test_data/hot_reload_const_project.dart
+3
-3
hot_reload_project.dart
.../test/integration.shard/test_data/hot_reload_project.dart
+5
-5
hot_reload_with_asset.dart
...st/integration.shard/test_data/hot_reload_with_asset.dart
+3
-3
project_with_early_error.dart
...integration.shard/test_data/project_with_early_error.dart
+1
-1
project_with_immediate_exit.dart
...egration.shard/test_data/project_with_immediate_exit.dart
+1
-1
single_widget_reload_project.dart
...gration.shard/test_data/single_widget_reload_project.dart
+3
-3
stateless_stateful_project.dart
...tegration.shard/test_data/stateless_stateful_project.dart
+3
-3
stepping_project.dart
...ls/test/integration.shard/test_data/stepping_project.dart
+1
-1
test_project.dart
..._tools/test/integration.shard/test_data/test_project.dart
+1
-1
tests_project.dart
...tools/test/integration.shard/test_data/tests_project.dart
+1
-2
test_driver.dart
...ges/flutter_tools/test/integration.shard/test_driver.dart
+1
-1
No files found.
packages/flutter_tools/test/integration.shard/test_data/background_project.dart
View file @
0c796599
...
...
@@ -12,7 +12,7 @@ class BackgroundProject extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: ">=2.
0.0-dev.68.
0 <3.0.0"
sdk: ">=2.
12.0-
0 <3.0.0"
dependencies:
flutter:
...
...
@@ -62,7 +62,7 @@ class RepeatingBackgroundProject extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: ">=2.
0.0-dev.68.
0 <3.0.0"
sdk: ">=2.
12.0-
0 <3.0.0"
dependencies:
flutter:
...
...
packages/flutter_tools/test/integration.shard/test_data/basic_project.dart
View file @
0c796599
...
...
@@ -10,7 +10,7 @@ class BasicProject extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: ">=2.
0.0-dev.68.
0 <3.0.0"
sdk: ">=2.
12.0-
0 <3.0.0"
dependencies:
flutter:
...
...
@@ -63,7 +63,7 @@ class BasicProjectWithFlutterGen extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: ">=2.
0.0-dev.68.
0 <3.0.0"
sdk: ">=2.
12.0-
0 <3.0.0"
dependencies:
flutter:
...
...
@@ -75,6 +75,8 @@ class BasicProjectWithFlutterGen extends Project {
@override
final
String
main
=
r''
'
// @dart = 2.8
// generated package does not syupport null safety.
import '
dart:
async
';
import '
package:
flutter_gen
/
flutter_gen
.
dart
';
...
...
@@ -88,7 +90,7 @@ class BasicProjectWithUnaryMain extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: ">=2.
0.0-dev.68.
0 <3.0.0"
sdk: ">=2.
12.0-
0 <3.0.0"
dependencies:
flutter:
sdk: flutter
...
...
packages/flutter_tools/test/integration.shard/test_data/gen_l10n_project.dart
View file @
0c796599
...
...
@@ -47,6 +47,8 @@ dependencies:
@override
final
String
main
=
r''
'
// @dart = 2.8
// generated localizations do not support null safety.
import '
package:
flutter
/
material
.
dart
';
import '
l10n
/
app_localizations
.
dart
';
...
...
packages/flutter_tools/test/integration.shard/test_data/hot_reload_const_project.dart
View file @
0c796599
...
...
@@ -10,7 +10,7 @@ class HotReloadConstProject extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: ">=2.
0.0-dev.68.
0 <3.0.0"
sdk: ">=2.
12.0-
0 <3.0.0"
dependencies:
flutter:
...
...
@@ -26,8 +26,8 @@ class HotReloadConstProject extends Project {
void main() async {
WidgetsFlutterBinding.ensureInitialized();
final ByteData message = const StringCodec().encodeMessage('
AppLifecycleState
.
resumed
');
await ServicesBinding.instance.defaultBinaryMessenger.handlePlatformMessage('
flutter
/
lifecycle
', message, (_) { });
final ByteData message = const StringCodec().encodeMessage('
AppLifecycleState
.
resumed
')
!
;
await ServicesBinding.instance
!
.defaultBinaryMessenger.handlePlatformMessage('
flutter
/
lifecycle
', message, (_) { });
runApp(const MyApp());
}
...
...
packages/flutter_tools/test/integration.shard/test_data/hot_reload_project.dart
View file @
0c796599
...
...
@@ -10,7 +10,7 @@ class HotReloadProject extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: ">=2.
0.0-dev.68.
0 <3.0.0"
sdk: ">=2.
12.0-
0 <3.0.0"
dependencies:
flutter:
...
...
@@ -26,8 +26,8 @@ class HotReloadProject extends Project {
void main() async {
WidgetsFlutterBinding.ensureInitialized();
final ByteData message = const StringCodec().encodeMessage('
AppLifecycleState
.
resumed
');
await ServicesBinding.instance.defaultBinaryMessenger.handlePlatformMessage('
flutter
/
lifecycle
', message, (_) { });
final ByteData message = const StringCodec().encodeMessage('
AppLifecycleState
.
resumed
')
!
;
await ServicesBinding.instance
!
.defaultBinaryMessenger.handlePlatformMessage('
flutter
/
lifecycle
', message, (_) { });
runApp(MyApp());
}
...
...
@@ -51,8 +51,8 @@ class HotReloadProject extends Project {
// breakpoint.
// tick 3 = second hot reload warmup reassemble frame (pre breakpoint)
if
(
count
==
2
)
{
SchedulerBinding
.
instance
.
scheduleFrameCallback
((
Duration
timestamp
)
{
SchedulerBinding
.
instance
.
scheduleFrameCallback
((
Duration
timestamp
)
{
SchedulerBinding
.
instance
!
.
scheduleFrameCallback
((
Duration
timestamp
)
{
SchedulerBinding
.
instance
!
.
scheduleFrameCallback
((
Duration
timestamp
)
{
print
(
'breakpoint line'
);
// SCHEDULED BREAKPOINT
});
});
...
...
packages/flutter_tools/test/integration.shard/test_data/hot_reload_with_asset.dart
View file @
0c796599
...
...
@@ -10,7 +10,7 @@ class HotReloadWithAssetProject extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: ">=2.
0.0-dev.68.
0 <3.0.0"
sdk: ">=2.
12.0-
0 <3.0.0"
dependencies:
flutter:
...
...
@@ -29,8 +29,8 @@ import 'package:flutter/widgets.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
final ByteData message = const StringCodec().encodeMessage('
AppLifecycleState
.
resumed
');
await ServicesBinding.instance.defaultBinaryMessenger.handlePlatformMessage('
flutter
/
lifecycle
', message, (_) { });
final ByteData message = const StringCodec().encodeMessage('
AppLifecycleState
.
resumed
')
!
;
await ServicesBinding.instance
!
.defaultBinaryMessenger.handlePlatformMessage('
flutter
/
lifecycle
', message, (_) { });
runApp(MyApp());
}
...
...
packages/flutter_tools/test/integration.shard/test_data/project_with_early_error.dart
View file @
0c796599
...
...
@@ -10,7 +10,7 @@ class ProjectWithEarlyError extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: ">=2.
0.0-dev.68.
0 <3.0.0"
sdk: ">=2.
12.0-
0 <3.0.0"
dependencies:
flutter:
...
...
packages/flutter_tools/test/integration.shard/test_data/project_with_immediate_exit.dart
View file @
0c796599
...
...
@@ -10,7 +10,7 @@ class ProjectWithImmediateExit extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: ">=2.
0.0-dev.68.
0 <3.0.0"
sdk: ">=2.
12.0-
0 <3.0.0"
dependencies:
flutter:
...
...
packages/flutter_tools/test/integration.shard/test_data/single_widget_reload_project.dart
View file @
0c796599
...
...
@@ -10,7 +10,7 @@ class SingleWidgetReloadProject extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: ">=2.
0.0-dev.68.
0 <3.0.0"
sdk: ">=2.
12.0-
0 <3.0.0"
dependencies:
flutter:
...
...
@@ -26,8 +26,8 @@ class SingleWidgetReloadProject extends Project {
void main() async {
WidgetsFlutterBinding.ensureInitialized();
final ByteData message = const StringCodec().encodeMessage('
AppLifecycleState
.
resumed
');
await ServicesBinding.instance.defaultBinaryMessenger.handlePlatformMessage('
flutter
/
lifecycle
', message, (_) { });
final ByteData message = const StringCodec().encodeMessage('
AppLifecycleState
.
resumed
')
!
;
await ServicesBinding.instance
!
.defaultBinaryMessenger.handlePlatformMessage('
flutter
/
lifecycle
', message, (_) { });
runApp(MyApp());
}
...
...
packages/flutter_tools/test/integration.shard/test_data/stateless_stateful_project.dart
View file @
0c796599
...
...
@@ -10,7 +10,7 @@ class HotReloadProject extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: ">=2.
0.0-dev.68.
0 <3.0.0"
sdk: ">=2.
12.0-
0 <3.0.0"
dependencies:
flutter:
...
...
@@ -29,8 +29,8 @@ class HotReloadProject extends Project {
void main() async {
WidgetsFlutterBinding.ensureInitialized();
final ByteData message = const StringCodec().encodeMessage('
AppLifecycleState
.
resumed
');
await ServicesBinding.instance.defaultBinaryMessenger.handlePlatformMessage('
flutter
/
lifecycle
', message, (_) { });
final ByteData message = const StringCodec().encodeMessage('
AppLifecycleState
.
resumed
')
!
;
await ServicesBinding.instance
!
.defaultBinaryMessenger.handlePlatformMessage('
flutter
/
lifecycle
', message, (_) { });
runApp(MyApp());
}
...
...
packages/flutter_tools/test/integration.shard/test_data/stepping_project.dart
View file @
0c796599
...
...
@@ -9,7 +9,7 @@ class SteppingProject extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: '
>=
2.1
0
.
0
<
3.0
.
0
'
sdk: '
>=
2.1
2
.
0
-
0
<
3.0
.
0
'
dependencies:
flutter:
sdk: flutter
...
...
packages/flutter_tools/test/integration.shard/test_data/test_project.dart
View file @
0c796599
...
...
@@ -10,7 +10,7 @@ class TestProject extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: ">=2.
0.0-dev.68.
0 <3.0.0"
sdk: ">=2.
12.0-
0 <3.0.0"
dependencies:
flutter:
...
...
packages/flutter_tools/test/integration.shard/test_data/tests_project.dart
View file @
0c796599
...
...
@@ -14,7 +14,7 @@ class TestsProject extends Project {
final
String
pubspec
=
'''
name: test
environment:
sdk: ">=2.
0.0-dev.68.
0 <3.0.0"
sdk: ">=2.
12.0-
0 <3.0.0"
dependencies:
flutter:
...
...
@@ -29,7 +29,6 @@ class TestsProject extends Project {
String
get
main
=>
'// Unused'
;
final
String
testContent
=
r''
'
// @dart = 2.8
import '
package:
flutter_test
/
flutter_test
.
dart
';
void main() {
...
...
packages/flutter_tools/test/integration.shard/test_driver.dart
View file @
0c796599
...
...
@@ -369,7 +369,7 @@ abstract class FlutterTestDriver {
}
else
if
(!
ignoreAppStopEvent
&&
json
[
'event'
]
==
'app.stop'
)
{
await
subscription
.
cancel
();
final
StringBuffer
error
=
StringBuffer
();
error
.
write
(
'Received app.stop event while waiting for
$interestingOccurrence
\n\n
'
);
error
.
write
(
'Received app.stop event while waiting for
$interestingOccurrence
\n\n
$_errorBuffer
'
);
if
(
json
[
'params'
]
!=
null
&&
json
[
'params'
][
'error'
]
!=
null
)
{
error
.
write
(
'
${json['params']['error']}
\n\n
'
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment