Skip to content

Commit 5f0cca6

Browse files
cushonError Prone Team
authored andcommitted
Automatic code cleanup.
PiperOrigin-RevId: 830846168
1 parent 2b78f85 commit 5f0cca6

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

core/src/test/java/com/google/errorprone/refaster/AbstractUTreeTest.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,14 @@ public void assertUnifiesAndInlines(String expression, UTree<?> template) {
5858
}
5959

6060
public void assertUnifies(String expression, UTree<?> template) {
61-
assertWithMessage(
62-
String.format("Expected template %s to unify with expression %s", template, expression))
61+
assertWithMessage("Expected template %s to unify with expression %s", template, expression)
6362
.that(template.unify(parseExpression(expression), unifier).findFirst())
6463
.isPresent();
6564
}
6665

6766
public void assertInlines(String expression, UTree<?> template) {
6867
try {
69-
assertWithMessage(
70-
String.format(
71-
"Expected template %s to inline to expression %s", template, expression))
68+
assertWithMessage("Expected template %s to inline to expression %s", template, expression)
7269
.that(template.inline(inliner).toString())
7370
.isEqualTo(expression);
7471
} catch (CouldNotResolveImportException e) {
@@ -79,9 +76,7 @@ public void assertInlines(String expression, UTree<?> template) {
7976
public void assertInlines(String expression, UStatement template) {
8077
try {
8178
// javac's pretty-printer uses the platform line terminator
82-
assertWithMessage(
83-
String.format(
84-
"Expected template %s to inline to expression %s", template, expression))
79+
assertWithMessage("Expected template %s to inline to expression %s", template, expression)
8580
.that(Joiner.on(System.lineSeparator()).join(template.inlineStatements(inliner)))
8681
.isEqualTo(expression);
8782
} catch (CouldNotResolveImportException e) {

test_helpers/src/main/java/com/google/errorprone/CompilationTestHelper.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,11 @@ public void doTest() {
367367
expectedResult.ifPresent(
368368
expected ->
369369
assertWithMessage(
370-
String.format(
371-
"Expected compilation result %s, but was %s\n%s\n%s",
372-
expected,
373-
result,
374-
Joiner.on('\n').join(diagnosticHelper.getDiagnostics()),
375-
outputStream))
370+
"Expected compilation result %s, but was %s\n%s\n%s",
371+
expected,
372+
result,
373+
Joiner.on('\n').join(diagnosticHelper.getDiagnostics()),
374+
outputStream)
376375
.that(result)
377376
.isEqualTo(expected));
378377
}

0 commit comments

Comments
 (0)