aboutsummaryrefslogtreecommitdiff
path: root/value
diff options
context:
space:
mode:
authorcpovirk <cpovirk@google.com>2019-06-04 12:45:02 -0700
committerRon Shapiro <shapiro.rd@gmail.com>2019-06-06 11:06:15 -0400
commit42433c6048c0a81e7669d3d9e36fece025185487 (patch)
treede271487e21fe719a6e0df8c6877015a57020b43 /value
parentf13cae11623c6725a7aa15f67572577862d24242 (diff)
downloadauto-42433c6048c0a81e7669d3d9e36fece025185487.tar.gz
Update to Truth 0.45, and address deprecations.
Renames may include: - containsAllOf => containsAtLeast - containsAllIn => containsAtLeastElementsIn - isSameAs => isSameInstanceAs - isOrdered => isInOrder - isStrictlyOrdered => isInStrictOrder The other major change is to change custom subjects to extend raw Subject instead of supplying type parameters. The type parameters are being removed from Subject. This CL will temporarily produce rawtypes warnings, which will go away when I remove the type parameters (as soon as this batch of CLs is submitted). Some CLs in this batch also migrate calls away from actualAsString(). Its literal replacement is `"<" + actual + ">"` (unless an object overrides actualCustomStringRepresentation()), but usually I've made a larger change, such as switching from an old-style "Not true that..." failure message to one generated with the Fact API. In that case, the new code usually contains a direct reference to this.actual (a field that I occasionally had to create). Another larger change I sometimes made is to switch from a manual check-and-fail approach to instead use check(...). And sometimes I just remove a withMessage() call that's no longer necessary now that the code uses check(...), or I introduce a check(...) call. (An assertion made with check(...) automatically includes the actual value from the original subject, so there's no need to set it again with withMessage().) Finally, there's one CL in this batch in which I migrate a Correspondence subclass to instead use Correspondence.from. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=251495286
Diffstat (limited to 'value')
-rw-r--r--value/pom.xml4
-rw-r--r--value/src/test/java/com/google/auto/value/extension/memoized/MemoizedMethodSubject.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/value/pom.xml b/value/pom.xml
index 77e677d5..0fa9223d 100644
--- a/value/pom.xml
+++ b/value/pom.xml
@@ -38,7 +38,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<guava.version>27.0.1-jre</guava.version>
- <truth.version>0.44</truth.version>
+ <truth.version>0.45</truth.version>
</properties>
<scm>
@@ -107,7 +107,7 @@
<dependency>
<groupId>com.google.testing.compile</groupId>
<artifactId>compile-testing</artifactId>
- <version>0.16</version>
+ <version>0.18</version>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
diff --git a/value/src/test/java/com/google/auto/value/extension/memoized/MemoizedMethodSubject.java b/value/src/test/java/com/google/auto/value/extension/memoized/MemoizedMethodSubject.java
index d4a58971..c6888f8f 100644
--- a/value/src/test/java/com/google/auto/value/extension/memoized/MemoizedMethodSubject.java
+++ b/value/src/test/java/com/google/auto/value/extension/memoized/MemoizedMethodSubject.java
@@ -27,7 +27,7 @@ import com.google.common.truth.Subject;
import com.google.testing.compile.JavaFileObjects;
import javax.tools.JavaFileObject;
-final class MemoizedMethodSubject extends Subject<MemoizedMethodSubject, String> {
+final class MemoizedMethodSubject extends Subject {
private final String actual;
MemoizedMethodSubject(FailureMetadata failureMetadata, String actual) {