Skip to content

Commit 442f3c0

Browse files
cpovirkgkdn
authored andcommitted
Extend raw Subject instead of supplying type parameters. (#384)
The type parameters are being removed from Subject. Also, update to Truth 0.45, which makes this change possible by loosening the type parameters on Subject.Factory.
1 parent 6794c27 commit 442f3c0

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

WORKSPACE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ java_import_external(
8989

9090
java_import_external(
9191
name = "com_google_truth",
92-
jar_sha256 = "a9e6796786c9c77a5fe19b08e72fe0a620d53166df423d8861af9ebef4dc4247",
92+
jar_sha256 = "0f7dced2a16e55a77e44fc3ff9c5be98d4bf4bb30abc18d78ffd735df950a69f",
9393
jar_urls = [
94-
"https://mirror.bazel.build/repo1.maven.org/maven2/com/google/truth/truth/0.44/truth-0.44.jar",
95-
"http://repo1.maven.org/maven2/com/google/truth/truth/0.44/truth-0.44.jar",
96-
"http://maven.ibiblio.org/maven2/com/google/truth/truth/0.44/truth-0.44.jar",
94+
"https://mirror.bazel.build/repo1.maven.org/maven2/com/google/truth/truth/0.45/truth-0.45.jar",
95+
"http://repo1.maven.org/maven2/com/google/truth/truth/0.45/truth-0.45.jar",
96+
"http://maven.ibiblio.org/maven2/com/google/truth/truth/0.45/truth-0.45.jar",
9797
],
9898
licenses = ["notice"], # Apache 2.0
9999
testonly_ = 1,

javatests/io/bazel/rules/closure/WebpathTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import com.google.common.testing.EqualsTester;
2727
import com.google.common.testing.NullPointerTester;
2828
import com.google.common.truth.BooleanSubject;
29-
import com.google.common.truth.DefaultSubject;
3029
import com.google.common.truth.IterableSubject;
3130
import com.google.common.truth.Subject;
3231
import com.google.common.truth.Truth;
@@ -62,7 +61,7 @@ private Path xp(String path) {
6261
}
6362

6463
// Workaround fact that Path interface matches multiple assertThat() method overloads.
65-
private static Subject<DefaultSubject, Object> assertThat(Object subject) {
64+
private static Subject assertThat(Object subject) {
6665
return Truth.assertThat(subject);
6766
}
6867

javatests/io/bazel/rules/closure/worker/testing/ProgramResult.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ public interface FailedChain {
6969
WarningsChain withErrors(String... warnings);
7070
}
7171

72-
private static final class ProgramResultSubject
73-
extends Subject<ProgramResultSubject, ProgramResult>
72+
private static final class ProgramResultSubject extends Subject
7473
implements ResultChain, WarningsChain, FailedChain {
7574

7675
private final ProgramResult actual;

0 commit comments

Comments
 (0)