Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Jul 29, 2022

expect(fakeProcessManager.hasRemainingExpectations, isFalse) failures look like:

Expected: false
  Actual: <true>

Using the _HasNoRemainingExpectations matcher, expect(fakeProcessManager, hasNoRemainingExpectations) says which command expectations are remaining.

  Expected: a fake process manager with no remaining expectations
    Actual: <Instance of '_SequenceProcessManager'>
     Which: has remaining expectations:
            [the, command]

Description describeMismatch(
dynamic item,
Description description,
Map<dynamic, dynamic> matchState,
bool verbose,
) {
final FakeProcessManager fakeProcessManager = item as FakeProcessManager;
return description.add(
'has remaining expectations:\n${fakeProcessManager._remainingExpectations.map((FakeCommand command) => command.command).join('\n')}');
}

Switch false/isFalse matcher to hasNoRemainingExpectations everywhere.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@jmagman jmagman added the tool Affects the "flutter" command-line tool. See also t: labels. label Jul 29, 2022
@jmagman jmagman self-assigned this Jul 29, 2022
Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I've been trying to fix these as I see them (but then again, I probably added a lot of these)

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 30, 2022
@auto-submit auto-submit bot merged commit 7c7ae99 into flutter:master Jul 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jul 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jul 30, 2022
camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
@jmagman jmagman deleted the hasNoRemainingExpectations branch August 31, 2022 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants