migrate more unit tests to null safety#106153
Merged
jonahwilliams merged 18 commits intoflutter:masterfrom Jun 18, 2022
Merged
Conversation
added 3 commits
June 16, 2022 21:35
added 2 commits
June 16, 2022 23:15
jmagman
reviewed
Jun 17, 2022
| // found in the LICENSE file. | ||
|
|
||
| // @dart = 2.8 | ||
|
|
Member
There was a problem hiding this comment.
Extra lines in a lot of these files.
| final dynamic data = jsonDecode(versionFile.readAsStringSync()); | ||
| if (data is! Map<String, Object>) { | ||
| if (data is! Map<String, Object?>) { | ||
| throw Exception("Expected object of type 'Map<String, Object>' but got one of type '${data.runtimeType}'"); |
Member
There was a problem hiding this comment.
Suggested change
| throw Exception("Expected object of type 'Map<String, Object>' but got one of type '${data.runtimeType}'"); | |
| throw Exception("Expected object of type 'Map<String, Object?>' but got one of type '${data.runtimeType}'"); |
| FileSystem fileSystem; | ||
| Artifacts artifacts; | ||
| Logger logger; | ||
| FakeProcessManager? processManager; |
| Environment environment; | ||
| FileSystem fileSystem; | ||
| late Environment environment; | ||
| FileSystem? fileSystem; |
| Artifacts artifacts; | ||
| FileSystem fileSystem; | ||
| Logger logger; | ||
| FakeProcessManager? processManager; |
|
|
||
| @override | ||
| bool supportsHotReload; | ||
| late bool supportsHotReload; |
Member
There was a problem hiding this comment.
Suggested change
| late bool supportsHotReload; | |
| bool supportsHotReload = false; |
|
|
||
| @override | ||
| bool supportsHotRestart; | ||
| late bool supportsHotRestart; |
Member
There was a problem hiding this comment.
Suggested change
| late bool supportsHotRestart; | |
| bool supportsHotRestart = false; |
| FileSystem fs; | ||
| FakeFlutterProject flutterProject; | ||
| FakeFlutterManifest flutterManifest; | ||
| FileSystem? fs; |
|
|
||
| void main() { | ||
| FileSystem fileSystem; | ||
| FileSystem? fileSystem; |
| BufferLogger logger; | ||
| FileSystem fs; | ||
| late BufferLogger logger; | ||
| FileSystem? fs; |
Member
There was a problem hiding this comment.
late
I'm running out of steam here, please audit the rest 🙂
jonahwilliams
commented
Jun 17, 2022
Contributor
Author
jonahwilliams
left a comment
There was a problem hiding this comment.
I think I got em all
| final dynamic data = jsonDecode(versionFile.readAsStringSync()); | ||
| if (data is! Map<String, Object>) { | ||
| if (data is! Map<String, Object?>) { | ||
| throw Exception("Expected object of type 'Map<String, Object>' but got one of type '${data.runtimeType}'"); |
| Environment environment; | ||
| FileSystem fileSystem; | ||
| late Environment environment; | ||
| FileSystem? fileSystem; |
| FileSystem fileSystem; | ||
| Artifacts artifacts; | ||
| Logger logger; | ||
| FakeProcessManager? processManager; |
| Artifacts artifacts; | ||
| FileSystem fileSystem; | ||
| Logger logger; | ||
| FakeProcessManager? processManager; |
| late Environment androidEnvironment; | ||
| late Environment iosEnvironment; | ||
| late Artifacts artifacts; | ||
| FileSystem? fileSystem; |
| FileSystem? fileSystem; | ||
|
|
||
| ProcessManager processManager; | ||
| ProcessManager? processManager; |
Comment on lines
+68
to
+69
| MemoryFileSystem? memoryFileSystem; | ||
| FakePlatform? fakePlatform; |
| FileSystem fs; | ||
| FakeFlutterProject flutterProject; | ||
| FakeFlutterManifest flutterManifest; | ||
| FileSystem? fs; |
|
|
||
| void main() { | ||
| FileSystem fileSystem; | ||
| FileSystem? fileSystem; |
| BufferLogger logger; | ||
| FileSystem fs; | ||
| late BufferLogger logger; | ||
| FileSystem? fs; |
jmagman
approved these changes
Jun 18, 2022
| // found in the LICENSE file. | ||
|
|
||
| // @dart = 2.8 | ||
|
|
|
|
||
| @override | ||
| bool supportsHotReload; | ||
| late bool supportsHotReload; |
| return <String, Object>{}; | ||
| } | ||
| return castStringKeyedMap(json.decode(file.readAsStringSync())); | ||
| return castStringKeyedMap(json.decode(file.readAsStringSync()))!.cast(); |
Member
There was a problem hiding this comment.
Huh I would have thought this would need to be .cast<String, Object>()
added 11 commits
June 17, 2022 19:02
Contributor
Author
|
Both the google3 and customer testing errors I'm getting are stale. Actually the google3 test errors look like they're coming from the wrong PR |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jun 18, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Jun 18, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Jun 19, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Jun 20, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Jun 20, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Jun 20, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Jun 21, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Jun 21, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Jun 21, 2022
camsim99
pushed a commit
to camsim99/flutter
that referenced
this pull request
Aug 10, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 30, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/plugins
that referenced
this pull request
Aug 30, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#71511
Migrates unit tests that do not have any null unsafe code in their transitive closure. this allows the tests to correctly run in sound mode.