Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Conversation

gspencergoog
Copy link
Contributor

Description

This adds a copyWith function to FakePlatform so that it is easy to override just one value from another platform. This can cut down a lot on duplicate code in tests, since you can make one template platform, and then just customize bits of it in each test.

Tests

  • added tests for the copyWith function.

@gspencergoog gspencergoog requested a review from tvolkert August 16, 2021 20:32
Copy link
Contributor

@tvolkert tvolkert left a comment

Choose a reason for hiding this comment

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

LGTM. If you plan to publish immediately, then bump the pubspec version and CHANGELOG as well.

@gspencergoog gspencergoog force-pushed the fake_copywith branch 3 times, most recently from c48ef04 to e6c90cf Compare August 16, 2021 22:49
@gspencergoog gspencergoog merged commit a09333f into dart-archive:master Aug 16, 2021
@gspencergoog gspencergoog deleted the fake_copywith branch August 16, 2021 22:54
mosuem pushed a commit to dart-lang/core that referenced this pull request Oct 16, 2024
…archive/platform#33)

This adds a copyWith function to FakePlatform so that it is easy to override just one value from another platform. This can cut down a lot on duplicate code in tests, since you can make one template platform, and then just customize bits of it in each test.

Also, updated travis.sh to work with "dart format" instead of "dartfmt", and bumped the version number.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants