Skip to content

Commit

Permalink
Update Truth to 0.42
Browse files Browse the repository at this point in the history
0.42
Made various dependency fixes and upgrades, including fixing #473 and #467. Note that some annotations-only dependencies are now no longer <provided>. See google/guava#2721 for details, but in short, feel free to exclude them if that works for your setup.
Fixed NPE in MapSubject.containsExactly (#468).

0.41
Changed most of Truth's failure messages to a multi-line, key-value format. Provided an API for testing messages of this format. (4a51035)
Introduced the new API for building failure messages in a "key: value" format. See Subject.failWithActual and failWithoutActual, which use the new Fact class. (e06ca85)
Changed the old API's failure messages to automatically add a "name: ..." field if the user called named(). In some cases, this adds a name where it was missing before; in others, it duplicates a name that is already present. The long-term fix for this will be to migrate to the new failure API, which always includes the name once, and possibly also to delete named() in favor of withMessage(). (911c939)
Deprecated failWithRawMessageAndCause. Truth automatically attaches the cause if it's part of the assertion chain. If not, see the deprecation docs for the workaround. (3622e9c)
Deprecated failComparing. Use check("foo").that(actual().foo()).isEqualTo(expectedFoo). (2db2a4f)
Deprecated the remaining legacy fail* methods. (1f9b2d6)
Hid protected method IterableSubject.failWithBadResultsAndSuffix() (5becbfe).
Started throwing ComparisonFailure from MapSubject.containsEntry. (4330ec6)
Started throwing ComparisonFailure from assertThat(singleElementIterable).containsExactly(otherSingleElementIterable). (e44edd1)
Added code to remove Runner and Statement frames from the stack trace. (d2bb074)
Added StringSubject.ignoringCase() (13e8054)
Added ignoringExtraRepeatedFieldElements() to ProtoTruth. (f070204)
Added comparingExpectedFieldsOnly() to ProtoTruth. (08908c1)
Removed deprecated MultimapSubject.containsExactly(Multimap). Use containsExactlyEntriesIn(Multimap). (containsExactly(Object k0, Object v0, Object... rest) continues to exist.) (9c80ad5)
Removed deprecated isPartiallyOrdered() methods. Use isOrdered() (5becbfe).
Started throwing UOE from IterableSubject.isNoneOf() and isNotIn(). (46c8d3d)
Switched to Checker Framework @NullableDecl instead of jsr305 @nullable. Tools that read these annotations may need to be updated to recognize the new annotation. (10ee459)
  • Loading branch information
ZacSweers committed Oct 12, 2018
1 parent 5a65af4 commit a0d10c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test = [
androidRules: "androidx.test:rules:${versions.androidTest}",
androidOrchestrator: "androidx.test:orchestrator:${versions.androidTest}",
junit: 'junit:junit:4.12',
truth: 'com.google.truth:truth:0.40'
truth: 'com.google.truth:truth:0.42'
]

ext.deps = [
Expand Down

0 comments on commit a0d10c5

Please sign in to comment.