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
bf92d7f2
Unverified
Commit
bf92d7f2
authored
Oct 15, 2018
by
Jacob Richman
Committed by
GitHub
Oct 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run flutter tests with --track-widget-creation as part of the build. (#22596)
parent
4f4005ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
test.dart
dev/bots/test.dart
+8
-0
widget_inspector_test.dart
packages/flutter/test/widgets/widget_inspector_test.dart
+8
-8
No files found.
dev/bots/test.dart
View file @
bf92d7f2
...
...
@@ -175,6 +175,11 @@ Future<void> _runTests() async {
await
_runSmokeTests
();
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
));
// Only packages/flutter/test/widgets/widget_inspector_test.dart really
// needs to be run with --track-widget-creation but it is nice to run
// all of the tests in package:flutter with the flag to ensure that
// the Dart kernel transformer triggered by the flag does not break anything.
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
),
options:
<
String
>[
'--track-widget-creation'
]);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_localizations'
));
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_driver'
));
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_test'
));
...
...
@@ -188,6 +193,9 @@ Future<void> _runTests() async {
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'layers'
));
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'stocks'
));
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'flutter_gallery'
));
// Regression test to ensure that code outside of package:flutter can run
// with --track-widget-creation.
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'flutter_gallery'
),
options:
<
String
>[
'--track-widget-creation'
]);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'catalog'
));
print
(
'
${bold}
DONE: All tests successful.
$reset
'
);
...
...
packages/flutter/test/widgets/widget_inspector_test.dart
View file @
bf92d7f2
...
...
@@ -678,23 +678,23 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
// would make this test fragile.
expect
(
lineA
+
1
,
equals
(
lineB
));
// Column numbers are more stable than line numbers.
expect
(
columnA
,
equals
(
21
));
expect
(
columnA
,
equals
(
15
));
expect
(
columnA
,
equals
(
columnB
));
expect
(
parameterLocationsA
.
length
,
equals
(
1
));
final
Map
<
String
,
Object
>
paramA
=
parameterLocationsA
[
0
];
expect
(
paramA
[
'name'
],
equals
(
'data'
));
expect
(
paramA
[
'line'
],
equals
(
lineA
));
expect
(
paramA
[
'column'
],
equals
(
2
6
));
expect
(
paramA
[
'column'
],
equals
(
2
0
));
expect
(
parameterLocationsB
.
length
,
equals
(
2
));
final
Map
<
String
,
Object
>
paramB1
=
parameterLocationsB
[
0
];
expect
(
paramB1
[
'name'
],
equals
(
'data'
));
expect
(
paramB1
[
'line'
],
equals
(
lineB
));
expect
(
paramB1
[
'column'
],
equals
(
2
6
));
expect
(
paramB1
[
'column'
],
equals
(
2
0
));
final
Map
<
String
,
Object
>
paramB2
=
parameterLocationsB
[
1
];
expect
(
paramB2
[
'name'
],
equals
(
'textDirection'
));
expect
(
paramB2
[
'line'
],
equals
(
lineB
));
expect
(
paramB2
[
'column'
],
equals
(
31
));
expect
(
paramB2
[
'column'
],
equals
(
25
));
},
skip:
!
WidgetInspectorService
.
instance
.
isWidgetCreationTracked
());
// Test requires --track-widget-creation flag.
testWidgets
(
'WidgetInspectorService setPubRootDirectories'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -1204,23 +1204,23 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
// would make this test fragile.
expect
(
lineA
+
1
,
equals
(
lineB
));
// Column numbers are more stable than line numbers.
expect
(
columnA
,
equals
(
21
));
expect
(
columnA
,
equals
(
15
));
expect
(
columnA
,
equals
(
columnB
));
expect
(
parameterLocationsA
.
length
,
equals
(
1
));
final
Map
<
String
,
Object
>
paramA
=
parameterLocationsA
[
0
];
expect
(
paramA
[
'name'
],
equals
(
'data'
));
expect
(
paramA
[
'line'
],
equals
(
lineA
));
expect
(
paramA
[
'column'
],
equals
(
2
6
));
expect
(
paramA
[
'column'
],
equals
(
2
0
));
expect
(
parameterLocationsB
.
length
,
equals
(
2
));
final
Map
<
String
,
Object
>
paramB1
=
parameterLocationsB
[
0
];
expect
(
paramB1
[
'name'
],
equals
(
'data'
));
expect
(
paramB1
[
'line'
],
equals
(
lineB
));
expect
(
paramB1
[
'column'
],
equals
(
2
6
));
expect
(
paramB1
[
'column'
],
equals
(
2
0
));
final
Map
<
String
,
Object
>
paramB2
=
parameterLocationsB
[
1
];
expect
(
paramB2
[
'name'
],
equals
(
'textDirection'
));
expect
(
paramB2
[
'line'
],
equals
(
lineB
));
expect
(
paramB2
[
'column'
],
equals
(
31
));
expect
(
paramB2
[
'column'
],
equals
(
25
));
},
skip:
!
WidgetInspectorService
.
instance
.
isWidgetCreationTracked
());
// Test requires --track-widget-creation flag.
testWidgets
(
'ext.flutter.inspector.setPubRootDirectories'
,
(
WidgetTester
tester
)
async
{
...
...
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