tag:github.com,2008:https://github.com/google/truth/releases Release notes from truth 2025-09-10T14:13:47Z tag:github.com,2008:Repository/1936771/v1.4.5 2025-09-10T14:54:17Z 1.4.5 <ul> <li>Changed assertions like <code>assertThat(nullMap).isEmpty()</code> to fail with a useful failure message instead of throwing <code>NullPointerException</code> (and similarly for other "bogus" values, such as negative sizes). (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/da5d6e96f3da26402fb22ac2d585e68e58f46b21/hovercard" href="https://github.com/google/truth/commit/da5d6e96f3da26402fb22ac2d585e68e58f46b21"><tt>da5d6e9</tt></a>)</li> <li>Made Kotlin's <code>isInstanceOf(Int::class.java)</code> (and Java's <code>isInstanceOf(int.class)</code>) a valid way to check for <code>Int</code>/<code>Integer</code> instances. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/974ef195b1b0a04ba5607ffcdd1076912d042ce1/hovercard" href="https://github.com/google/truth/commit/974ef195b1b0a04ba5607ffcdd1076912d042ce1"><tt>974ef19</tt></a>)</li> <li>Improved <code>isWithin</code> to pretty-print numbers in its failure messages. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/de785536dd34c4ee3d160c8b502bcd164a609fce/hovercard" href="https://github.com/google/truth/commit/de785536dd34c4ee3d160c8b502bcd164a609fce"><tt>de78553</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/07318c23e3e90e5546f116bba14255ff3a634bbc/hovercard" href="https://github.com/google/truth/commit/07318c23e3e90e5546f116bba14255ff3a634bbc"><tt>07318c2</tt></a>)</li> <li>Improved some assertions that print class names to print simpler names (e.g., <code>Integer</code> instead of <code>java.lang.Integer</code>). (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/0ba72d60fdb384aa97da03e2403a6757f63bf129/hovercard" href="https://github.com/google/truth/commit/0ba72d60fdb384aa97da03e2403a6757f63bf129"><tt>0ba72d6</tt></a>)</li> <li>Changed <code>ExpectFailure</code> to never generate "value of" lines based on bytecode. This slightly simplifies writing new tests with <code>ExpectFailure</code> and prevents future behavior changes in some <code>ExpectFailure</code> tests that already exist. However, it may also require changes to other existing <code>ExpectFailure</code> tests to remove or change any assertions about the "value of" line. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/3caa0e845575c2c6f17ee62716f7064584b79efb/hovercard" href="https://github.com/google/truth/commit/3caa0e845575c2c6f17ee62716f7064584b79efb"><tt>3caa0e8</tt></a>)</li> <li>Our Android <code>minSdkVersion</code> is now 23 (Marshmallow). This follows the minimum of Google's foundational Android libraries, and we expect it to have no practical impact on users. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/c85c75cf4de1e9b9ecc3f20b2ee90265b578c9ae/hovercard" href="https://github.com/google/truth/commit/c85c75cf4de1e9b9ecc3f20b2ee90265b578c9ae"><tt>c85c75c</tt></a>)</li> <li>Changed our GWT/J2CL artifact to omit usages of <code>@NullMarked</code>. This was making all our types non-null in those environments, since we don't yet use <code>@Nullable</code> in the GWT/J2CL artifact. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/6392d37e7b83ad615a770f038114ab551ec1a018/hovercard" href="https://github.com/google/truth/commit/6392d37e7b83ad615a770f038114ab551ec1a018"><tt>6392d37</tt></a>)</li> </ul> cpovirk tag:github.com,2008:Repository/1936771/v1.4.4 2024-07-12T22:05:46Z v1.4.4 <ul> <li>Annotated the rest of the main package for nullness, and moved the <code>@NullMarked</code> annotation from individual classes up to the package to avoid <a href="https://github.com/google/truth/issues/1320" data-hovercard-type="issue" data-hovercard-url="/google/truth/issues/1320/hovercard">a warning under <code>--release 8</code></a>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/e107aeadc83761211a48e5170eb0c64756a0c20f/hovercard" href="https://github.com/google/truth/commit/e107aeadc83761211a48e5170eb0c64756a0c20f"><tt>e107aea</tt></a>)</li> <li>Improved the failure message for <code>matches</code> to conditionally suggest using <code>containsMatch</code>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/7e9fc7aec13385fdc34afc13db0220d99a9b6c5a/hovercard" href="https://github.com/google/truth/commit/7e9fc7aec13385fdc34afc13db0220d99a9b6c5a"><tt>7e9fc7a</tt></a>)</li> </ul> cpovirk tag:github.com,2008:Repository/1936771/v1.4.3 2024-07-12T21:51:41Z 1.4.3 <p><strong>Known Issue for at least some builds targeting Java 8, fixed in <a href="https://github.com/google/truth/releases/tag/v1.4.4">1.4.4</a>:</strong> "unknown enum constant ElementType.MODULE": <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2401468835" data-permission-text="Title is private" data-url="https://github.com/google/truth/issues/1320" data-hovercard-type="issue" data-hovercard-url="/google/truth/issues/1320/hovercard" href="https://github.com/google/truth/issues/1320">#1320</a>. As far as we know, this is only a warning, so it should cause practical problems only if you use <code>-Werror</code> or you perform reflection on <a href="https://jspecify.dev/docs/api/org/jspecify/annotations/NullMarked.html" rel="nofollow"><code>@NullMarked</code></a> under a Java 8 runtime.</p> <ul> <li>Added more nullness information to our APIs (in the form of <a href="https://jspecify.dev/" rel="nofollow">JSpecify</a> annotations). This could lead to additional warnings (or even errors) for users of Kotlin and other nullness checkers. Please <a href="https://github.com/google/truth/issues/new">report any problems</a>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/ee680cbafc7db5ce188ad26077e7dbb4eb2a97cb/hovercard" href="https://github.com/google/truth/commit/ee680cbafc7db5ce188ad26077e7dbb4eb2a97cb"><tt>ee680cb</tt></a>)</li> <li>Deprecated <code>Subject.Factory</code> methods for Java 8 types. We won't remove them, but you can simplify your code by migrating off them: Just replace <code>assertAbout(foos()).that(foo)</code> with <code>assertThat(foo)</code> (or <code>about(foos()).that(foo)</code> with <code>that(foo)</code>). (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/59e7a50653bd0518f86ffc8c8fadac7a3d67a540/hovercard" href="https://github.com/google/truth/commit/59e7a50653bd0518f86ffc8c8fadac7a3d67a540"><tt>59e7a50</tt></a>)</li> </ul> cpovirk tag:github.com,2008:Repository/1936771/v1.4.2 2024-02-29T22:14:01Z 1.4.2 <p>This release is the final step of copying all our methods from <code>Truth8</code> to <code>Truth</code>. If you have not already migrated your usages from <code>Truth8</code> to <code>Truth</code>, you may see build errors:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="OptionalSubjectTest.java:39: error: reference to assertThat is ambiguous assertThat(Optional.of(&quot;foo&quot;)).isPresent(); ^ both method assertThat(@org.checkerframework.checker.nullness.qual.Nullable Optional&lt;?&gt;) in Truth8 and method assertThat(@org.checkerframework.checker.nullness.qual.Nullable Optional&lt;?&gt;) in Truth match"><pre class="notranslate"><code>OptionalSubjectTest.java:39: error: reference to assertThat is ambiguous assertThat(Optional.of("foo")).isPresent(); ^ both method assertThat(@org.checkerframework.checker.nullness.qual.Nullable Optional&lt;?&gt;) in Truth8 and method assertThat(@org.checkerframework.checker.nullness.qual.Nullable Optional&lt;?&gt;) in Truth match </code></pre></div> <p>In most cases, you can migrate your whole project mechanically: <code>git grep -l Truth8 | xargs perl -pi -e 's/\bTruth8\b/Truth/g;'</code>. (You can make that change before upgrading to Truth 1.4.2 or as part of the same commit.)</p> <p>If you instead need to migrate your project incrementally (for example, because it is very large), you may want to upgrade your version of Truth incrementally, too, following our instructions for <a href="https://github.com/google/truth/releases/tag/v1.3.0">1.3.0</a> and <a href="https://github.com/google/truth/releases/tag/v1.4.0">1.4.0</a>.</p> <h2>For help</h2> <p>Please feel welcome to <a href="https://github.com/google/truth/issues/new">open an issue</a> to report problems or request help.</p> <h2>Changelog</h2> <ul> <li>Removed temporary type parameters from <code>Truth.assertThat(Stream)</code> and <code>Truth.assertThat(Optional)</code>. This can create build errors, which you can fix by replacing all your references to <code>Truth8</code> with references to <code>Truth</code>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/45782bd0e987b15c2cd0a1bfbed850f64828ae65/hovercard" href="https://github.com/google/truth/commit/45782bd0e987b15c2cd0a1bfbed850f64828ae65"><tt>45782bd</tt></a>)</li> </ul> cpovirk tag:github.com,2008:Repository/1936771/v1.4.1 2025-07-23T19:45:51Z 1.4.1 <p>This release deprecates <code>Truth8</code>.</p> <p>All its methods have become available on the main <code>Truth</code> class. In most cases, you can migrate your whole project mechanically: <code>git grep -l Truth8 | xargs perl -pi -e 's/\bTruth8\b/Truth/g;'</code></p> <p>While we do not plan to delete <code>Truth8</code>, we recommend migrating off it, at least if you static import <code>assertThat</code>: If you do not migrate, such static imports become ambiguous in Truth 1.4.2, breaking your build.</p> cpovirk tag:github.com,2008:Repository/1936771/v1.4.0 2024-02-29T21:53:46Z 1.4.0 <p>In this release, our assertions on Java 8 types continue to move from the <code>Truth8</code> class to the main <code>Truth</code> class. This change should not break compatibility for any supported JDK or Android version, even users who test under old versions of Android without <a href="https://developer.android.com/studio/write/java8-support#library-desugaring" rel="nofollow">API desugaring</a>. Additionally, we will never break binary compatibility, though some users will have to make changes to their source code in order for it to compile against newer versions.</p> <p>This release is likely to lead to more <strong>build failures</strong> than <a href="https://github.com/google/truth/releases/tag/v1.3.0">1.3.0</a> did. However, those failures should be <strong>straightforward to fix</strong>.</p> <h2>Example build failure</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Foo.java:152: error: reference to assertThat is ambiguous assertThat(repo.findFileWithName(&quot;foo&quot;)).isNull(); ^ both method assertThat(@org.checkerframework.checker.nullness.qual.Nullable Path) in Truth8 and method assertThat(@org.checkerframework.checker.nullness.qual.Nullable Path) in Truth match"><pre class="notranslate"><code>Foo.java:152: error: reference to assertThat is ambiguous assertThat(repo.findFileWithName("foo")).isNull(); ^ both method assertThat(@org.checkerframework.checker.nullness.qual.Nullable Path) in Truth8 and method assertThat(@org.checkerframework.checker.nullness.qual.Nullable Path) in Truth match </code></pre></div> <h2>Simplest upgrade strategy (if you can update all your code atomically in the same commit as the Truth upgrade)</h2> <p>In the same commit:</p> <ol> <li>Upgrade Truth to 1.4.0.</li> <li>Replace <code>import static com.google.common.truth.Truth8.assertThat;</code> with <code>import static com.google.common.truth.Truth.assertThat;</code>. <ul> <li>If you use Kotlin, replace <code>import com.google.common.truth.Truth8.assertThat</code> with <code>import com.google.common.truth.Truth.assertThat</code>.</li> </ul> </li> <li>Replace <code>import com.google.common.truth.Truth8;</code> with <code>import com.google.common.truth.Truth;</code>. <ul> <li>again, similarly for Kotlin if needed</li> </ul> </li> <li>Optionally replace remaining references to <code>Truth8</code> with references to <code>Truth</code>. <ul> <li>For example, replace <code>Truth8.assertThat(optional).isPresent()</code> with <code>Truth.assertThat(optional).isPresent()</code>.</li> </ul> </li> </ol> <p>If you're feeling lucky, you can try this one-liner for the code updates:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git grep -l Truth8 | xargs perl -pi -e 's/import static com.google.common.truth.Truth8.assertThat;/import static com.google.common.truth.Truth.assertThat;/g; s/import com.google.common.truth.Truth8.assertThat/import com.google.common.truth.Truth.assertThat/g; s/import com.google.common.truth.Truth8/import com.google.common.truth.Truth/g; s/\bTruth8[.]/Truth./g;'"><pre>git grep -l Truth8 <span class="pl-k">|</span> xargs perl -pi -e <span class="pl-s"><span class="pl-pds">'</span>s/import static com.google.common.truth.Truth8.assertThat;/import static com.google.common.truth.Truth.assertThat;/g; s/import com.google.common.truth.Truth8.assertThat/import com.google.common.truth.Truth.assertThat/g; s/import com.google.common.truth.Truth8/import com.google.common.truth.Truth/g; s/\bTruth8[.]/Truth./g;<span class="pl-pds">'</span></span></pre></div> <p>In most cases, that can be further simplified to:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git grep -l Truth8 | xargs perl -pi -e 's/\bTruth8\b/Truth/g;'"><pre>git grep -l Truth8 <span class="pl-k">|</span> xargs perl -pi -e <span class="pl-s"><span class="pl-pds">'</span>s/\bTruth8\b/Truth/g;<span class="pl-pds">'</span></span></pre></div> <p>After that process, it is possible that you'll still see build errors from ambiguous usages of <code>assertThat</code> static imports. If so, you can find a workaround in the section about overload ambiguity in the release notes for <a href="https://github.com/google/truth/releases/tag/v1.3.0">1.3.0</a>. Alternatively, you can wait to upgrade until after a future Truth release, which will eliminate the ambiguity by changing the signatures of some <code>Truth.assertThat</code> overloads.</p> <h2>Incremental upgrade strategy</h2> <p>If you have a very large repo or you have other reasons to prefer to upgrade incrementally, you can use the approach that we used inside Google. Roughly, that approach was:</p> <ol> <li>Make the optional changes discussed in the release notes for <a href="https://github.com/google/truth/releases/tag/v1.3.0">1.3.0</a>.</li> <li>For any remaining calls to <code>Truth8.assertThat</code>, change them to <em>avoid</em> static import. <ul> <li>That is, replace <code>assertThat(optional).isPresent()</code> with <code>Truth8.assertThat(optional).isPresent()</code>.</li> </ul> </li> <li>Upgrade Truth to 1.4.0.</li> <li>Optionally replace references to <code>Truth8</code> with references to <code>Truth</code> (including restoring static imports if desired), as discussed in section about the simple upgrade strategy above.</li> </ol> <h2>Optional additional changes</h2> <ul> <li>If you use <code>assertWithMessage(...).about(intStreams()).that(...)</code>, <code>expect.about(optionalLongs()).that(...)</code>, or similar, you can remove your call to <code>about</code>. This change will never be necessary; it is just a simplification. <ul> <li>This is similar to a previous optional change from <a href="https://github.com/google/truth/releases/tag/v1.3.0">1.3.0</a>, except that 1.3.0 solved this problem for <code>streams</code> and <code>optionals</code>, whereas 1.4.0 solves it for the other <code>Truth8</code> types.</li> </ul> </li> </ul> <h2>For help</h2> <p>Please feel welcome to <a href="https://github.com/google/truth/issues/new">open an issue</a> to report problems or request help.</p> <h2>Changelog</h2> <ul> <li>Added the remaining <code>Truth8.assertThat</code> overloads to the main <code>Truth</code> class. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/9be8e774ca41a2a85c49d203bc47dac78861aeaa/hovercard" href="https://github.com/google/truth/commit/9be8e774ca41a2a85c49d203bc47dac78861aeaa"><tt>9be8e77</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/1f81827f1b5512cb1bb4e09b1cd688337b155e0c/hovercard" href="https://github.com/google/truth/commit/1f81827f1b5512cb1bb4e09b1cd688337b155e0c"><tt>1f81827</tt></a>)</li> <li>Added more <code>that</code> overloads to make it possible to write type-specific assertions when using the remaining Java 8 types. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/7c65fc611d102c82b7218073315421656a5a19ca/hovercard" href="https://github.com/google/truth/commit/7c65fc611d102c82b7218073315421656a5a19ca"><tt>7c65fc6</tt></a>)</li> </ul> cpovirk tag:github.com,2008:Repository/1936771/v1.3.0 2024-02-02T18:37:02Z 1.3.0 <p>In this release, our assertions on Java 8 types begin to move from the <code>truth-java8-extensions</code> artifact and the <code>Truth8</code> class to the main <code>truth</code> artifact and the <code>Truth</code> class. This change should not break compatibility for any supported JDK or Android version, even users who test under old versions of Android without <a href="https://developer.android.com/studio/write/java8-support#library-desugaring" rel="nofollow">API desugaring</a>. Additionally, we will never break binary compatibility, though some users will have to make changes to their source code in order for it to compile against newer versions.</p> <p>This change will be routine for most users, but we're providing as much information as we can for any users who do encounter problems.</p> <p>We will post fuller instructions for migration later on, once we've learned more from our internal migration efforts. For now, you may find that you need to make one kind of change, and you may elect to make others. (If we missed anything, please <a href="https://github.com/google/truth/issues/new">open an issue</a> to report problems or request help.)</p> <p>The change you might need to make:</p> <ul> <li>By adding new overloads of <code>Truth.assertThat</code>, we cause some code to fail to compile because of an overload ambiguity. This is rare, but it can happen if you static import both <code>Truth.assertThat</code> and some other <code>assertThat</code> method that includes overloads for <code>Optional</code> or <code>Stream</code>. (It does <em>not</em> happen for <code>Truth8.assertThat</code>, though, except with the Eclipse compiler. Nor it does <em>necessarily</em> happen for other <code>assertThat(Stream)</code> and <code>assertThat(Optional)</code> methods.) If this happens to you, you'll need to remove one of the static imports, changing the corresponding call sites from "<code>assertThat</code>" to "<code>FooSubject.assertThat</code>." <ul> <li>Alternatively, you may choose to wait until we make further changes to the new <code>Truth.assertThat</code> overloads. Once we make those further changes, you may be able to simultaneously replace all your imports of <code>Truth8.assertThat</code> with imports of <code>Truth.assertThat</code> as you upgrade to the new version, likely without introducing overload ambiguities.</li> </ul> </li> </ul> <p>The changes you might elect to make:</p> <ul> <li> <p>If you use <code>Truth8.assertThat(Stream)</code> or <code>Truth8.assertThat(Optional)</code>, you can migrate to the new overloads in <code>Truth</code>. If you static import <code>Truth8.assertThat</code>, you can usually make this change simply by replacing that static import with a static import of <code>Truth.assertThat</code>—or, if you already have an import of <code>Truth.assertThat</code>, by just removing the import of <code>Truth8.assertThat</code>. (If you additionally use less common assertion methods, like <code>assertThat(OptionalInt)</code>, you'll want to use <em>both</em> imports for now. Later, we'll move <code>assertThat(OptionalInt)</code> and friends, too.) We recommend making this change now, since your calls to <code>Truth8.assertThat</code> will fail to compile against some future version of Truth, unless you plan to wait to update your Truth dependency until we've made all our changes for Java 8 types.</p> </li> <li> <p>If you use <code>assertWithMessage(...).about(streams()).that(...)</code>, <code>expect.about(optionals()).that(...)</code>, or similar, you can remove your call to <code>about</code>. This change will never be necessary; it is just a simplification.</p> </li> <li> <p>If you depend on <code>truth-java8-extension</code>, you may remove it. All its classes are now part of the main <code>truth</code> artifact. This change, too, is not necessary; it is just a simplification. (OK, if your build system has a concept of <a href="https://blog.bazel.build/2017/06/28/sjd-unused_deps.html" rel="nofollow">strict deps</a>, there is a chance that you'll <em>need</em> to add deps on <code>truth</code> to replace your deps on <code>truth-java8-extension</code>.)</p> </li> </ul> <p>Finally, the changelog for this release:</p> <ul> <li>Made <code>StreamSubject</code> avoid collecting the <code>Stream</code> until necessary, and made its <code>isEqualTo</code> and <code>isNotEqualTo</code> methods no longer always throw. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/f8ecaec69513c267aeb045be8297729cac520de7/hovercard" href="https://github.com/google/truth/commit/f8ecaec69513c267aeb045be8297729cac520de7"><tt>f8ecaec</tt></a>)</li> <li>Added <code>assertThat</code> overloads for <code>Optional</code> and <code>Stream</code> to the main <code>Truth</code> class. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/37fd8bea90c0ab4528c4c922c88fa176eb45f65b/hovercard" href="https://github.com/google/truth/commit/37fd8bea90c0ab4528c4c922c88fa176eb45f65b"><tt>37fd8be</tt></a>)</li> <li>Added <code>that</code> overloads to make it possible to write type-specific assertions when using <code>expect.that(optional)</code> and <code>expect.that(stream)</code>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/ca7e8f4c51742ec2e89d2e49e85f9cea3e3048cf/hovercard" href="https://github.com/google/truth/commit/ca7e8f4c51742ec2e89d2e49e85f9cea3e3048cf"><tt>ca7e8f4</tt></a>)</li> <li>Moved the <code>truth-java8-extension</code> classes into the main <code>truth</code> artifact. There is no longer any need to depend on <code>truth-java8-extension</code>, which is now empty. (We've also removed the <code>Truth8</code> <a href="https://www.gwtproject.org/" rel="nofollow">GWT</a> module.) (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/eb0426eb76494aa439ec7297ade9a1ec40ed47ee/hovercard" href="https://github.com/google/truth/commit/eb0426eb76494aa439ec7297ade9a1ec40ed47ee"><tt>eb0426e</tt></a>)</li> </ul> <p>Again, if you have any problems, please <a href="https://github.com/google/truth/issues/new">let us know</a>.</p> cpovirk tag:github.com,2008:Repository/1936771/v1.2.0 2023-12-19T19:08:29Z 1.2.0 <ul> <li>Fixed a bug that caused ProtoTruth to ignore the contents of unpacked <code>Any</code> messages. This fix may cause tests to fail, since ProtoTruth will now check whether the message contents match. If so, you may need to change the values that your tests expect, or there may be a bug in the code under test that had been hidden by the Truth bug. Sorry for the trouble. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/8bd3ef613365e5e6888af8a2c27a2a39b6436b0b/hovercard" href="https://github.com/google/truth/commit/8bd3ef613365e5e6888af8a2c27a2a39b6436b0b"><tt>8bd3ef6</tt></a>)</li> <li>Added <code>isWithin().of()</code> support to <code>IntegerSubject</code> and <code>LongSubject</code>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/6464cb5caac4815e4ae9caff99ebdf04c90d09c3/hovercard" href="https://github.com/google/truth/commit/6464cb5caac4815e4ae9caff99ebdf04c90d09c3"><tt>6464cb5</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/0e99a27112c7b00e1985b114ca7387ebe75e5166/hovercard" href="https://github.com/google/truth/commit/0e99a27112c7b00e1985b114ca7387ebe75e5166"><tt>0e99a27</tt></a>)</li> </ul> cpovirk tag:github.com,2008:Repository/1936771/v1.1.5 2023-06-20T14:35:07Z 1.1.5 <ul> <li>Updated Truth to depend on <a href="https://github.com/google/guava/releases/tag/v32.0.1">Guava 32.0.1</a>. The previous Guava version, 32.0.0, contained a bug under Windows, which did not affect Truth's functionality but <a href="https://github.com/google/truth/issues/1137" data-hovercard-type="issue" data-hovercard-url="/google/truth/issues/1137/hovercard">could cause problems</a> for people who use Guava's I/O functionality in their codebase. Affected users can already manually update their Guava dependency to 32.0.1, but if they don't depend directly on Guava, they may find it easier to upgrade to this new Truth release instead.</li> <li>Fixed <code>IterableOfProtosSubject</code> to produce a proper failure message instead of NPE when the actual value is <code>null</code>.</li> </ul> cpovirk tag:github.com,2008:Repository/1936771/v1.1.4 2023-05-30T17:53:27Z 1.1.4 <ul> <li>Updated Truth to build with <code>-source 8 -target 8</code>. This means that it no longer runs under Java 7 VMs. It continues to run under Android, even old versions, for all apps that have <a href="https://developer.android.com/studio/write/java8-support#supported_features" rel="nofollow">enabled support for Java 8 language features</a>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/db5db242941b3308f1a988bcc0cb1185c7f24225/hovercard" href="https://github.com/google/truth/commit/db5db242941b3308f1a988bcc0cb1185c7f24225"><tt>db5db24</tt></a>)</li> <li>Updated Truth to depend on Guava 32.0.0. That release contains changes related to CVEs. Neither of the CVEs relates to any methods that are used by Truth, so this version bump is just about eliminating any warnings related to the old version and helping tools like Maven to select the newest version of Guava. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/f8d4dbba8adc65effba70879d59a39da092dce51/hovercard" href="https://github.com/google/truth/commit/f8d4dbba8adc65effba70879d59a39da092dce51"><tt>f8d4dbb</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/99b1df8852a25b5638590bea1b55a31ae536936d/hovercard" href="https://github.com/google/truth/commit/99b1df8852a25b5638590bea1b55a31ae536936d"><tt>99b1df8</tt></a>)</li> <li>Added support for <code>value of: method()</code> to <code>expect.that</code>, matching the existing support for <code>assertThat</code>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/bd8efd003e70ccdc539ce16965f80a8c0ca57c8b/hovercard" href="https://github.com/google/truth/commit/bd8efd003e70ccdc539ce16965f80a8c0ca57c8b"><tt>bd8efd0</tt></a>)</li> <li>Enhanced <code>IterableSubject.containsAtLeastElementsIn().inOrder()</code> to print an extra line that shows only the expected elements in their actual order. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/9da7dd184b3934eca6aa187ddf2c20f602327a5d/hovercard" href="https://github.com/google/truth/commit/9da7dd184b3934eca6aa187ddf2c20f602327a5d"><tt>9da7dd1</tt></a>)</li> <li>Annotated Truth for nullness. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/truth/commit/2151add71d6af7ccdd66d36d7f0b06ab6c5b831b/hovercard" href="https://github.com/google/truth/commit/2151add71d6af7ccdd66d36d7f0b06ab6c5b831b"><tt>2151add</tt></a>)</li> </ul> cpovirk