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
8b52e6a8
Unverified
Commit
8b52e6a8
authored
Aug 24, 2020
by
Todd Volkert
Committed by
GitHub
Aug 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass --verbose-logging to flutter_tester (#64440)
parent
9ee552d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
flutter_platform.dart
packages/flutter_tools/lib/src/test/flutter_platform.dart
+1
-0
flutter_platform_test.dart
...utter_tools/test/general.shard/flutter_platform_test.dart
+43
-0
No files found.
packages/flutter_tools/lib/src/test/flutter_platform.dart
View file @
8b52e6a8
...
...
@@ -800,6 +800,7 @@ class FlutterPlatform extends PlatformPlugin {
'--skia-deterministic-rendering'
,
'--enable-dart-profiling'
,
'--non-interactive'
,
'--verbose-logging'
,
'--use-test-fonts'
,
'--packages=
$packages
'
,
if
(
nullAssertions
)
...
...
packages/flutter_tools/test/general.shard/flutter_platform_test.dart
View file @
8b52e6a8
...
...
@@ -123,6 +123,49 @@ void main() {
},
overrides:
contextOverrides
);
});
group
(
'The arguments that are passed to the test process'
,
()
{
MockPlatform
mockPlatform
;
MockProcessManager
mockProcessManager
;
FlutterPlatform
flutterPlatform
;
final
Map
<
Type
,
Generator
>
contextOverrides
=
<
Type
,
Generator
>{
Platform:
()
=>
mockPlatform
,
ProcessManager:
()
=>
mockProcessManager
,
FileSystem:
()
=>
fileSystem
,
};
setUp
(()
{
mockPlatform
=
MockPlatform
();
when
(
mockPlatform
.
isWindows
).
thenReturn
(
false
);
mockProcessManager
=
MockProcessManager
();
flutterPlatform
=
TestFlutterPlatform
();
when
(
mockPlatform
.
environment
).
thenReturn
(<
String
,
String
>{});
});
Future
<
Set
<
String
>>
captureArguments
()
async
{
flutterPlatform
.
loadChannel
(
'test1.dart'
,
MockSuitePlatform
());
when
(
mockProcessManager
.
start
(
any
,
environment:
anyNamed
(
'environment'
)),
).
thenAnswer
((
_
)
{
return
Future
<
Process
>.
value
(
MockProcess
());
});
await
untilCalled
(
mockProcessManager
.
start
(
any
,
environment:
anyNamed
(
'environment'
)));
final
VerificationResult
toVerify
=
verify
(
mockProcessManager
.
start
(
captureAny
,
environment:
anyNamed
(
'environment'
),
));
expect
(
toVerify
.
captured
,
hasLength
(
1
));
expect
(
toVerify
.
captured
.
first
,
isA
<
List
<
String
>>());
final
List
<
String
>
command
=
toVerify
.
captured
.
first
as
List
<
String
>;
return
command
.
where
((
String
element
)
=>
element
.
startsWith
(
'-'
)).
toSet
();
}
testUsingContext
(
'contain --verbose-logging'
,
()
async
{
final
Set
<
String
>
capturedArguments
=
await
captureArguments
();
expect
(
capturedArguments
,
contains
(
'--verbose-logging'
));
},
overrides:
contextOverrides
);
});
testUsingContext
(
'installHook creates a FlutterPlatform'
,
()
{
expect
(()
=>
installHook
(
buildMode:
BuildMode
.
debug
,
...
...
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