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

Bump truth from 0.42 to 0.45 #336

Merged
merged 1 commit into from Jun 11, 2019

Conversation

Projects
None yet
2 participants
@dependabot-preview
Copy link
Contributor

commented Jun 10, 2019

Bumps truth from 0.42 to 0.45.

Release notes

Sourced from truth's releases.

Truth 0.45

We are pushing hard to release a Truth 1.0 by June 30, after which we don't expect to remove any more APIs. Thanks for your patience with both our slow progress over the past several years and our rapid churn now.

To use the migration tools below, you'll need to set up Error Prone and configure our tools as plugins to run in patch mode.

Deletions:

  • Removed deprecated Subject.isSameAs and isNotSameAs. Use isSameInstanceAs and isNotSameInstanceAs, which are equivalent. (36200e6a)
  • Hid the constuctor of Correspondence. Use the class's static factory methods instead. The most mechanical migration is usually to Correspondence.from. We will release a tool soon to help with migration. (11da1ca2)
  • Removed deprecated Subject.fail* methods. See Subject.failWithActual and failWithoutActual, which use the new Fact class. To help with migration, we're released FailWithFacts (and also ImplementAssertionWithChaining, which is also sometimes useful for these migrations), though you will likely need to make manual changes, as well. (36200e6a)
  • Removed deprecated no-arg Subject.check(). Use the overload that accepts a description. (To help with this migration, we have added ProvideDescriptionToCheck to Error Prone -- but then removed it before it became part of a release, so you'll need to pull it in manually.) (36200e6a)
  • Removed deprecated MathUtil. For similar static methods, see Guava's DoubleMath.fuzzyEquals. But callers from custom Subject implementations may prefer an approach like check("score()").that(actual.score()).isWithin(tolerance).of(expected). (7b2876d0)
  • Removed deprecated createAndEnableStackTrace(). Use create(), which now also enables stack traces. (9362f4cb)

Deprecations:

  • Deprecated isOrdered() and isStrictlyOrdered(). Use isInOrder() and isInStrictOrder(), which are equivalent. (146080a5, 386207d5)
  • Deprecated containsAll* on ProtoTruth, *StreamSubject, and Primitive*ArraySubject.*ArrayAsIterable. Use containsAtLeast*, which is equivalent. (82c1f2dc, 386207d5)
  • Deprecated Subject.actual(). Instead of calling it, declare your own field to store the actual value. To automate most migrations, we've provided StoreActualValueInField. (297c0f1e)
  • Deprecated Subject.named. Instead of assertThat(foo).named("foo"), use assertWithMessage("foo").that(foo). For custom subjects, use assertWithMessage("foo").about(foos()).that(foo). For other scenarios, see this FAQ entry about adding messages. To automate most migrations, we've provided NamedToWithMessage (and a quick-and-dirty regex version for common cases). We plan to also release notes from our API Review of this decision. (08afb24e)
  • "Deprecated" the type parameters on Subject. To prepare for their removal in the next release, you can edit your code today to refer to the raw Subject type. (Kotlin Subject authors, see below.) Also "deprecated" the self-type parameter on ComparableSubject. Again, you can prepare your code by referring to raw ComparableSubject (and later change it to refer to ComparableSubject<T> when the class has only one type parameter next release). Similarly, "deprecated" the type parameters on ProtoSubject and LiteProtoSubject, along with most of the type parameters of IterableOfProtosSubject, MapWithProtoValuesSubject, and MultimapWithProtoValuesSubject. (21c29f77, 5abd9edc)
  • Loosened type parameters on Subject.Factory. This permits custom Subject subclasses extend raw Subject instead of Subject<FooSubject, Foo> to prepare for when we remove the type parameters from Subject entirely.
  • Deprecated DefaultSubject. Use plain Subject. (7b5311b4)
  • Deprecated SortedMapSubject and SortedSetSubject. Users will have to perform assertions directly on the result of methods like firstKey. We haven't found sufficient demand for the classes to keep them. (46aebcf4)
  • Deprecated the SetMultimap-specific and ListMultimap-specific Subjects, which add little to the general Multimap subjects. (2103fee1)
  • Deprecated actualAsString() and internalCustomName(). They exist primarily to support named(), which is being removed. (d69ba29f)

Other migration notes:

  • The order in which you migrate can be important: Migrate off actual() and named() before removing type parameters from custom Subject classes.
  • The tool we'll release for migrating off named requires that custom Subject classes expose a Subject.Factory, as described in our docs about extensions.
  • To remove the type parameters from Subject subclasses, you can get most of the way there with a Perl-compatible regex search-and-replace operation: s/\bSubject<([^<>]*|[^<>]*<[^<>]*>[^<>]*|[^<>]*<[^<>]*>[^<>]*<[^<>]*>[^<>]*|[^<>]*<[^<>]*<[^<>]*>[^<>]*>)>/Subject/g

Features:

  • For very simple tests, failure messages will include a "value of:" line. For example, the failure message of assertThat(fetchLogMessages()).isEmpty() might contain "value of: fetchLogMessages()." This feature is not available under Android or GWT, and it is only available if you have ASM on your classpath.
  • Exposed the constructors of ThrowableSubject, MapSubject, and MultimapSubject to subclasses. Note that actually extending those subjects won't fully work until we remove the type parameters from Subject. (1a39d5af, 32f76a59)
  • Temporarily made DefaultSubject extensible again. Kotlin subjects can now extend DefaultSubject instead of Subject. This lets those subjects compile both before and after we remove the type parameters from Subject. After we remove the type parameters, Kotlin subjects should extend Subject again (with no type parameters), as we'll later remove DefaultSubject. (6e45b276)
  • Made ProtoTruth Subject classes extend IterableSubject, MapSubject, and MultimapSubject. (1a39d5af).
  • Updated stack-trace cleaning to handle reflection under Java 9.

Truth 0.44

To use the migration tools below, you'll need to set up Error Prone and configure our tools as plugins to run in patch mode.

  • Deprecated Subject.isSameAs and isNotSameAs. Use isSameInstanceAs and isNotSameInstanceAs, which are equivalent. (bc845f0d)
  • Deprecated IterableSubject.containsAllOf and containsAllIn. Use the containsAtLeast and containsAtLeastElementsIn, which are equivalent. (bc845f0d)
  • Deprecated the no-arg Subject.check(). Use the overload that accepts a description. (To help with this migration, we have added ProvideDescriptionToCheck to Error Prone -- but then removed it before it became part of a release, so you'll need to pull it in manually.) (bc845f0d)
  • Deprecated Expect.createAndEnableStackTrace(). Expect.create() now does the same thing. (bc845f0d)
  • Deprecated the constructor of Correspondence. Instead of extending the type, use its new static factories. (To assist with this migration, we hope to supply an automated refactoring soon.) (bc845f0d, 8bd19b47)
  • Deprecated MathUtil. For similar static methods, see Guava's DoubleMath.fuzzyEquals. But callers from custom Subject implementations may prefer an approach like check("score()").that(actual.score()).isWithin(tolerance).of(expected). (bc845f0d)
  • Removed deprecated ComparableSubject.comparesEqualTo and Primitive{Double,Float}ArraySubject.hasValues{,Not}Within. (cc796b34)
  • Removed deprecated ThrowableSubject.hasMessage() (3164a248)
  • You can now create a Correspondence instance that adds in diff-formatting behavior to an existing Correspondence using Correspondence.formattingDiffsUsing. (d2223603)
... (truncated)
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking Bump now in your Dependabot dashboard.

Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

Bump truth from 0.42 to 0.45
Bumps [truth](https://github.com/google/truth) from 0.42 to 0.45.
- [Release notes](https://github.com/google/truth/releases)
- [Commits](https://github.com/google/truth/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

@dependabot-preview dependabot-preview bot force-pushed the dependabot/gradle/com.google.truth-truth-0.45 branch from 7e8f072 to 54d69e2 Jun 10, 2019

@codecov-io

This comment has been minimized.

Copy link

commented Jun 10, 2019

Codecov Report

Merging #336 into RxJava2.x will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           RxJava2.x     #336   +/-   ##
==========================================
  Coverage      83.17%   83.17%           
==========================================
  Files             11       11           
  Lines            434      434           
  Branches          33       33           
==========================================
  Hits             361      361           
  Misses            47       47           
  Partials          26       26

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 83e8682...54d69e2. Read the comment docs.

@pwittchen pwittchen merged commit fbebd66 into RxJava2.x Jun 11, 2019

4 checks passed

codecov/patch Coverage not affected when comparing 83e8682...54d69e2
Details
codecov/project 83.17% (target 80%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@pwittchen pwittchen deleted the dependabot/gradle/com.google.truth-truth-0.45 branch Jun 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.