Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] add GTest printer for FlValue #32652

Merged
merged 1 commit into from
Apr 13, 2022

Conversation

jpnurmi
Copy link
Member

@jpnurmi jpnurmi commented Apr 13, 2022

Improves test failure messages when matching FlValue arguments.

For example, before:

  Expected arg #2: has setting ("platformBrightness", 0x32f0980)
           Actual: 0x7f81ec005990, 0x32f0900

And after:

  Expected arg #2: has setting ("platformBrightness", dark)
           Actual: 0x27bded0, {textScaleFactor: 0.0, alwaysUse24HourFormat: false, platformBrightness: light}

This is a preparation step split off from #32618 that will eventually fix light
vs. dark theme detection on Linux (flutter/flutter#101438).

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 and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

Improves test failure messages when matching FlValue arguments.

For example, before:

  Expected arg #2: has setting ("platformBrightness", 0x32f0980)
           Actual: 0x7f81ec005990, 0x32f0900

And after:

  Expected arg #2: has setting ("platformBrightness", dark)
           Actual: 0x27bded0, {textScaleFactor: 0.0, alwaysUse24HourFormat: false, platformBrightness: light}
Copy link
Contributor

@robert-ancell robert-ancell left a comment

Choose a reason for hiding this comment

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

LGTM

@robert-ancell robert-ancell merged commit f502732 into flutter:main Apr 13, 2022
@jpnurmi jpnurmi deleted the fl-value-gtest-printer branch April 14, 2022 03:49
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 14, 2022
justinmc pushed a commit to justinmc/engine that referenced this pull request Apr 20, 2022
Improves test failure messages when matching FlValue arguments.

For example, before:

  Expected arg flutter#2: has setting ("platformBrightness", 0x32f0980)
           Actual: 0x7f81ec005990, 0x32f0900

And after:

  Expected arg flutter#2: has setting ("platformBrightness", dark)
           Actual: 0x27bded0, {textScaleFactor: 0.0, alwaysUse24HourFormat: false, platformBrightness: light}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants