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
28cb589c
Unverified
Commit
28cb589c
authored
Apr 15, 2019
by
Jonah Williams
Committed by
GitHub
Apr 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make flutterProject option of CoverageCollector optional (#31074)
parent
b0937a1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
fuchsia_tester.dart
packages/flutter_tools/bin/fuchsia_tester.dart
+4
-1
test.dart
packages/flutter_tools/lib/src/commands/test.dart
+3
-1
coverage_collector.dart
packages/flutter_tools/lib/src/test/coverage_collector.dart
+4
-1
No files found.
packages/flutter_tools/bin/fuchsia_tester.dart
View file @
28cb589c
...
...
@@ -116,7 +116,10 @@ Future<void> run(List<String> args) async {
Directory
testDirectory
;
CoverageCollector
collector
;
if
(
argResults
[
'coverage'
])
{
collector
=
CoverageCollector
(
await
FlutterProject
.
current
(),
coverageDirectory:
coverageDirectory
);
collector
=
CoverageCollector
(
flutterProject:
await
FlutterProject
.
current
(),
coverageDirectory:
coverageDirectory
,
);
if
(!
argResults
.
options
.
contains
(
_kOptionTestDirectory
))
{
throwToolExit
(
'Use of --coverage requires setting --test-directory'
);
}
...
...
packages/flutter_tools/lib/src/commands/test.dart
View file @
28cb589c
...
...
@@ -149,7 +149,9 @@ class TestCommand extends FastFlutterCommand {
CoverageCollector
collector
;
if
(
argResults
[
'coverage'
]
||
argResults
[
'merge-coverage'
])
{
collector
=
CoverageCollector
(
await
FlutterProject
.
current
());
collector
=
CoverageCollector
(
flutterProject:
await
FlutterProject
.
current
(),
);
}
final
bool
machine
=
argResults
[
'machine'
];
...
...
packages/flutter_tools/lib/src/test/coverage_collector.dart
View file @
28cb589c
...
...
@@ -21,7 +21,7 @@ import 'watcher.dart';
/// A class that's used to collect coverage data during tests.
class
CoverageCollector
extends
TestWatcher
{
CoverageCollector
(
this
.
flutterProject
,
{
this
.
coverageDirectory
});
CoverageCollector
(
{
this
.
flutterProject
,
this
.
coverageDirectory
});
Map
<
String
,
dynamic
>
_globalHitmap
;
final
Directory
coverageDirectory
;
...
...
@@ -63,6 +63,9 @@ class CoverageCollector extends TestWatcher {
if
(
coverageDirectory
!=
null
)
{
return
true
;
}
if
(
flutterProject
==
null
)
{
return
true
;
}
return
libraryName
.
contains
(
flutterProject
.
manifest
.
appName
);
})
.
then
<
void
>((
Map
<
String
,
dynamic
>
result
)
{
...
...
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