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
22e8d85d
Commit
22e8d85d
authored
Apr 21, 2016
by
Hans Muller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enhance Finder toString() (#3458)
* Enhance Finder toString()
parent
11f236ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
widget_tester.dart
packages/flutter_test/lib/src/widget_tester.dart
+1
-1
widget_tester_test.dart
packages/flutter_test/test/widget_tester_test.dart
+4
-4
No files found.
packages/flutter_test/lib/src/widget_tester.dart
View file @
22e8d85d
...
...
@@ -291,7 +291,7 @@ abstract class Finder {
}
@override
String
toString
()
=>
'
widget with
$description
'
;
String
toString
()
=>
'
[Finder for
$description
]
'
;
}
/// Indicates that an attempt to find a widget within the current element tree
...
...
packages/flutter_test/test/widget_tester_test.dart
View file @
22e8d85d
...
...
@@ -26,9 +26,9 @@ void main() {
expect
(
failure
,
isNotNull
);
String
message
=
failure
.
message
;
expect
(
message
,
contains
(
'Expected:
widget with text "foo"
exists in the element tree'
));
expect
(
message
,
contains
(
'Expected:
[Finder for text "foo"]
exists in the element tree'
));
expect
(
message
,
contains
(
"Actual: <Instance of 'WidgetTester'>"
));
expect
(
message
,
contains
(
'Which: Does not contain
widget with text "foo"
'
));
expect
(
message
,
contains
(
'Which: Does not contain
[Finder for text "foo"]
'
));
});
});
});
...
...
@@ -53,9 +53,9 @@ void main() {
expect
(
failure
,
isNotNull
);
String
message
=
failure
.
message
;
expect
(
message
,
contains
(
'Expected:
widget with text "foo"
does not exist in the element tree'
));
expect
(
message
,
contains
(
'Expected:
[Finder for text "foo"]
does not exist in the element tree'
));
expect
(
message
,
contains
(
"Actual: <Instance of 'WidgetTester'>"
));
expect
(
message
,
contains
(
'Which: Contains
widget with text "foo"
'
));
expect
(
message
,
contains
(
'Which: Contains
[Finder for text "foo"]
'
));
});
});
});
...
...
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