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
436ca01e
Unverified
Commit
436ca01e
authored
Apr 12, 2021
by
Jenn Magder
Committed by
GitHub
Apr 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate features_tests and other tool tests to null safety (#80168)
parent
e537661a
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
17 additions
and
43 deletions
+17
-43
bootstrap.dart
packages/flutter_tools/lib/src/web/bootstrap.dart
+1
-1
artifact_updater_test.dart
...utter_tools/test/general.shard/artifact_updater_test.dart
+0
-2
async_guard_test.dart
...utter_tools/test/general.shard/base/async_guard_test.dart
+0
-1
bot_detector_test.dart
...tter_tools/test/general.shard/base/bot_detector_test.dart
+3
-5
command_help_test.dart
...tter_tools/test/general.shard/base/command_help_test.dart
+6
-9
base_utils_test.dart
...ges/flutter_tools/test/general.shard/base_utils_test.dart
+0
-2
custom_device_workflow_test.dart
...ral.shard/custom_devices/custom_device_workflow_test.dart
+0
-2
features_test.dart
packages/flutter_tools/test/general.shard/features_test.dart
+4
-6
linux_workflow_test.dart
...r_tools/test/general.shard/linux/linux_workflow_test.dart
+0
-2
vscode_validator_test.dart
...ools/test/general.shard/vscode/vscode_validator_test.dart
+0
-2
bootstrap_test.dart
.../flutter_tools/test/general.shard/web/bootstrap_test.dart
+0
-2
memory_fs_test.dart
.../flutter_tools/test/general.shard/web/memory_fs_test.dart
+3
-5
workflow_test.dart
...s/flutter_tools/test/general.shard/web/workflow_test.dart
+0
-2
windows_workflow_test.dart
...ols/test/general.shard/windows/windows_workflow_test.dart
+0
-2
No files found.
packages/flutter_tools/lib/src/web/bootstrap.dart
View file @
436ca01e
...
@@ -101,7 +101,7 @@ define("$bootstrapModule", ["$entrypoint", "dart_sdk"], function(app, dart_sdk)
...
@@ -101,7 +101,7 @@ define("$bootstrapModule", ["$entrypoint", "dart_sdk"], function(app, dart_sdk)
String generateTestEntrypoint({
String generateTestEntrypoint({
required String relativeTestPath,
required String relativeTestPath,
required String absolutePath,
required String absolutePath,
required String testConfigPath,
required String
?
testConfigPath,
required LanguageVersion languageVersion,
required LanguageVersion languageVersion,
}) {
}) {
return '''
return '''
...
...
packages/flutter_tools/test/general.shard/artifact_updater_test.dart
View file @
436ca01e
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:file/memory.dart'
;
import
'package:file/memory.dart'
;
import
'package:file_testing/file_testing.dart'
;
import
'package:file_testing/file_testing.dart'
;
import
'package:flutter_tools/src/base/common.dart'
;
import
'package:flutter_tools/src/base/common.dart'
;
...
...
packages/flutter_tools/test/general.shard/base/async_guard_test.dart
View file @
436ca01e
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:async'
;
import
'package:flutter_tools/src/base/async_guard.dart'
;
import
'package:flutter_tools/src/base/async_guard.dart'
;
...
...
packages/flutter_tools/test/general.shard/base/bot_detector_test.dart
View file @
436ca01e
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:file/memory.dart'
;
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/base/bot_detector.dart'
;
import
'package:flutter_tools/src/base/bot_detector.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
...
@@ -19,9 +17,9 @@ final Uri azureUrl = Uri.parse('http://169.254.169.254/metadata/instance');
...
@@ -19,9 +17,9 @@ final Uri azureUrl = Uri.parse('http://169.254.169.254/metadata/instance');
void
main
(
)
{
void
main
(
)
{
group
(
'BotDetector'
,
()
{
group
(
'BotDetector'
,
()
{
FakePlatform
fakePlatform
;
late
FakePlatform
fakePlatform
;
FakeStdio
fakeStdio
;
late
FakeStdio
fakeStdio
;
PersistentToolState
persistentToolState
;
late
PersistentToolState
persistentToolState
;
setUp
(()
{
setUp
(()
{
fakePlatform
=
FakePlatform
()..
environment
=
<
String
,
String
>{};
fakePlatform
=
FakePlatform
()..
environment
=
<
String
,
String
>{};
...
...
packages/flutter_tools/test/general.shard/base/command_help_test.dart
View file @
436ca01e
...
@@ -2,20 +2,17 @@
...
@@ -2,20 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:flutter_tools/src/base/command_help.dart'
;
import
'package:flutter_tools/src/base/command_help.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/base/terminal.dart'
show
AnsiTerminal
,
OutputPreferences
;
import
'package:flutter_tools/src/base/terminal.dart'
show
AnsiTerminal
,
OutputPreferences
;
import
'package:meta/meta.dart'
;
import
'../../src/common.dart'
;
import
'../../src/common.dart'
;
import
'../../src/fakes.dart'
;
import
'../../src/fakes.dart'
;
CommandHelp
_createCommandHelp
(
{
CommandHelp
_createCommandHelp
(
{
@
required
bool
ansi
,
required
bool
ansi
,
@
required
int
wrapColumn
,
required
int
wrapColumn
,
})
{
})
{
final
Platform
platform
=
FakePlatform
(
final
Platform
platform
=
FakePlatform
(
stdoutSupportsAnsi:
ansi
,
stdoutSupportsAnsi:
ansi
,
...
@@ -36,9 +33,9 @@ CommandHelp _createCommandHelp({
...
@@ -36,9 +33,9 @@ CommandHelp _createCommandHelp({
// Used to use the message length in different scenarios in a DRY way
// Used to use the message length in different scenarios in a DRY way
void
_testMessageLength
(
{
void
_testMessageLength
(
{
@
required
bool
stdoutSupportsAnsi
,
required
bool
stdoutSupportsAnsi
,
@
required
int
maxTestLineLength
,
required
int
maxTestLineLength
,
@
required
int
wrapColumn
,
required
int
wrapColumn
,
})
{
})
{
final
CommandHelp
commandHelp
=
_createCommandHelp
(
final
CommandHelp
commandHelp
=
_createCommandHelp
(
ansi:
stdoutSupportsAnsi
,
ansi:
stdoutSupportsAnsi
,
...
@@ -82,7 +79,7 @@ void main() {
...
@@ -82,7 +79,7 @@ void main() {
group
(
'toString'
,
()
{
group
(
'toString'
,
()
{
testWithoutContext
(
'ends with a resetBold when it has parenthetical text'
,
()
{
testWithoutContext
(
'ends with a resetBold when it has parenthetical text'
,
()
{
final
Platform
platform
=
FakePlatform
(
stdoutSupportsAnsi:
true
);
final
Platform
platform
=
FakePlatform
(
stdoutSupportsAnsi:
true
);
final
AnsiTerminal
terminal
=
AnsiTerminal
(
stdio:
null
,
platform:
platform
);
final
AnsiTerminal
terminal
=
AnsiTerminal
(
stdio:
FakeStdio
()
,
platform:
platform
);
final
CommandHelpOption
commandHelpOption
=
CommandHelpOption
(
final
CommandHelpOption
commandHelpOption
=
CommandHelpOption
(
'tester'
,
'tester'
,
...
...
packages/flutter_tools/test/general.shard/base_utils_test.dart
View file @
436ca01e
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:flutter_tools/src/base/utils.dart'
;
import
'package:flutter_tools/src/base/utils.dart'
;
import
'../src/common.dart'
;
import
'../src/common.dart'
;
...
...
packages/flutter_tools/test/general.shard/custom_devices/custom_device_workflow_test.dart
View file @
436ca01e
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:flutter_tools/src/custom_devices/custom_device_workflow.dart'
;
import
'package:flutter_tools/src/custom_devices/custom_device_workflow.dart'
;
import
'../../src/common.dart'
;
import
'../../src/common.dart'
;
...
...
packages/flutter_tools/test/general.shard/features_test.dart
View file @
436ca01e
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:flutter_tools/src/base/config.dart'
;
import
'package:flutter_tools/src/base/config.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/features.dart'
;
import
'package:flutter_tools/src/features.dart'
;
...
@@ -14,16 +12,16 @@ import '../src/fakes.dart';
...
@@ -14,16 +12,16 @@ import '../src/fakes.dart';
void
main
(
)
{
void
main
(
)
{
group
(
'Features'
,
()
{
group
(
'Features'
,
()
{
Config
testConfig
;
late
Config
testConfig
;
FakePlatform
platform
;
late
FakePlatform
platform
;
FlutterFeatureFlags
featureFlags
;
late
FlutterFeatureFlags
featureFlags
;
setUp
(()
{
setUp
(()
{
testConfig
=
Config
.
test
();
testConfig
=
Config
.
test
();
platform
=
FakePlatform
(
environment:
<
String
,
String
>{});
platform
=
FakePlatform
(
environment:
<
String
,
String
>{});
for
(
final
Feature
feature
in
allFeatures
)
{
for
(
final
Feature
feature
in
allFeatures
)
{
testConfig
.
setValue
(
feature
.
configSetting
,
false
);
testConfig
.
setValue
(
feature
.
configSetting
!
,
false
);
}
}
featureFlags
=
FlutterFeatureFlags
(
featureFlags
=
FlutterFeatureFlags
(
...
...
packages/flutter_tools/test/general.shard/linux/linux_workflow_test.dart
View file @
436ca01e
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/features.dart'
;
import
'package:flutter_tools/src/features.dart'
;
import
'package:flutter_tools/src/linux/linux_workflow.dart'
;
import
'package:flutter_tools/src/linux/linux_workflow.dart'
;
...
...
packages/flutter_tools/test/general.shard/vscode/vscode_validator_test.dart
View file @
436ca01e
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:file/memory.dart'
;
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
...
...
packages/flutter_tools/test/general.shard/web/bootstrap_test.dart
View file @
436ca01e
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:flutter_tools/src/web/bootstrap.dart'
;
import
'package:flutter_tools/src/web/bootstrap.dart'
;
import
'package:package_config/package_config.dart'
;
import
'package:package_config/package_config.dart'
;
...
...
packages/flutter_tools/test/general.shard/web/memory_fs_test.dart
View file @
436ca01e
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'dart:convert'
;
import
'dart:convert'
;
import
'package:file/memory.dart'
;
import
'package:file/memory.dart'
;
...
@@ -30,9 +28,9 @@ void main() {
...
@@ -30,9 +28,9 @@ void main() {
final
WebMemoryFS
webMemoryFS
=
WebMemoryFS
();
final
WebMemoryFS
webMemoryFS
=
WebMemoryFS
();
webMemoryFS
.
write
(
source
,
manifest
,
sourcemap
,
metadata
);
webMemoryFS
.
write
(
source
,
manifest
,
sourcemap
,
metadata
);
expect
(
utf8
.
decode
(
webMemoryFS
.
files
[
'foo.js'
]),
'main() {}'
);
expect
(
utf8
.
decode
(
webMemoryFS
.
files
[
'foo.js'
]
!
),
'main() {}'
);
expect
(
utf8
.
decode
(
webMemoryFS
.
sourcemaps
[
'foo.js.map'
]),
'{}'
);
expect
(
utf8
.
decode
(
webMemoryFS
.
sourcemaps
[
'foo.js.map'
]
!
),
'{}'
);
expect
(
utf8
.
decode
(
webMemoryFS
.
metadataFiles
[
'foo.js.metadata'
]),
'{}'
);
expect
(
utf8
.
decode
(
webMemoryFS
.
metadataFiles
[
'foo.js.metadata'
]
!
),
'{}'
);
expect
(
webMemoryFS
.
mergedMetadata
,
'{}'
);
expect
(
webMemoryFS
.
mergedMetadata
,
'{}'
);
});
});
}
}
packages/flutter_tools/test/general.shard/web/workflow_test.dart
View file @
436ca01e
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/web/workflow.dart'
;
import
'package:flutter_tools/src/web/workflow.dart'
;
...
...
packages/flutter_tools/test/general.shard/windows/windows_workflow_test.dart
View file @
436ca01e
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/windows/windows_workflow.dart'
;
import
'package:flutter_tools/src/windows/windows_workflow.dart'
;
...
...
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