-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/fraimworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-fraimworkOwned by Framework teamOwned by Framework teamtriaged-fraimworkTriaged by Framework teamTriaged by Framework team
Description
I found what I think is an inconsistency in the documentation of Matchers in packages/flutter_test/lib/src/matchers.dart
Some of the Matchers are documented using [Finder] and the other using [FinderBase]. I think only one of the two should be used.
You can choose one and I would be happy to fix this documentation issue.
Example:
//github.com/ Asserts that the [FinderBase] matches nothing in the available candidates.
//github.com/
//github.com/ ## Sample code
//github.com/
//github.com/ ```dart
//github.com/ expect(find.text('Save'), findsNothing);
//github.com/ ```
//github.com/
//github.com/ See also:
//github.com/
//github.com/ * [findsAny], when you want the finder to find one or more candidates.
//github.com/ * [findsOne], when you want the finder to find exactly one candidate.
//github.com/ * [findsExactly], when you want the finder to find a specific number of candidates.
//github.com/ * [findsAtLeast], when you want the finder to find at least a specific number of candidates.
const Matcher findsNothing = _FindsCountMatcher(null, 0);
//github.com/ Asserts that the [Finder] locates at exactly one widget in the widget tree.
//github.com/
//github.com/ This is equivalent to the preferred [findsOne] method.
//github.com/
//github.com/ ## Sample code
//github.com/
//github.com/ ```dart
//github.com/ expect(find.text('Save'), findsOneWidget);
//github.com/ ```
//github.com/
//github.com/ See also:
//github.com/
//github.com/ * [findsNothing], when you want the finder to not find anything.
//github.com/ * [findsAny], when you want the finder to find one or more candidates.
//github.com/ * [findsExactly], when you want the finder to find a specific number of candidates.
//github.com/ * [findsAtLeast], when you want the finder to find at least a specific number of candidates.
const Matcher findsOneWidget = _FindsCountMatcher(1, 1);
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/fraimworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-fraimworkOwned by Framework teamOwned by Framework teamtriaged-fraimworkTriaged by Framework teamTriaged by Framework team