Skip to content

Commit

Permalink
Update Kotlinc to v2_0_10
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 661309748
  • Loading branch information
java-team-github-bot authored and Dagger Team committed Aug 12, 2024
1 parent f397f6b commit ed807b5
Showing 1 changed file with 24 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -467,18 +467,17 @@ public void invalidAnnotationValue() {
() -> superficialValidation.validateElement(testClassElement));
// TODO(b/248552462): Javac and KSP should match once this bug is fixed.
boolean isJavac = processingEnv.getBackend() == XProcessingEnv.Backend.JAVAC;
assertThat(exception)
.hasMessageThat()
.contains(
String.format(
NEW_LINES.join(
"Validation trace:",
" => element (CLASS): test.Outer.TestClass",
" => annotation type: test.Outer.TestAnnotation",
" => annotation: @test.Outer.TestAnnotation(classes={<%1$s>})",
" => annotation value (TYPE_ARRAY): classes={<%1$s>}",
" => annotation value (TYPE): classes=<%1$s>"),
isJavac ? "error" : "Error"));
String expectedMessage =
String.format(
NEW_LINES.join(
"Validation trace:",
" => element (CLASS): test.Outer.TestClass",
" => annotation type: test.Outer.TestAnnotation",
" => annotation: @test.Outer.TestAnnotation(classes={<%1$s>})",
" => annotation value (TYPE_ARRAY): classes={<%1$s>}",
" => annotation value (TYPE): classes=<%1$s>"),
isJavac ? "error" : "Error");
assertThat(exception).hasMessageThat().contains(expectedMessage);
});
}

Expand Down Expand Up @@ -527,20 +526,19 @@ public void invalidAnnotationValueOnParameter() {
() -> superficialValidation.validateElement(parameter));
// TODO(b/248552462): Javac and KSP should match once this bug is fixed.
boolean isJavac = processingEnv.getBackend() == XProcessingEnv.Backend.JAVAC;
assertThat(exception)
.hasMessageThat()
.contains(
String.format(
NEW_LINES.join(
"Validation trace:",
" => element (CLASS): test.Outer.TestClass",
" => element (CONSTRUCTOR): TestClass(java.lang.String)",
" => element (PARAMETER): strParam",
" => annotation type: test.Outer.TestAnnotation",
" => annotation: @test.Outer.TestAnnotation(classes={<%1$s>})",
" => annotation value (TYPE_ARRAY): classes={<%1$s>}",
" => annotation value (TYPE): classes=<%1$s>"),
isJavac ? "error" : "Error"));
String expectedMessage =
String.format(
NEW_LINES.join(
"Validation trace:",
" => element (CLASS): test.Outer.TestClass",
" => element (CONSTRUCTOR): TestClass(java.lang.String)",
" => element (PARAMETER): strParam",
" => annotation type: test.Outer.TestAnnotation",
" => annotation: @test.Outer.TestAnnotation(classes={<%1$s>})",
" => annotation value (TYPE_ARRAY): classes={<%1$s>}",
" => annotation value (TYPE): classes=<%1$s>"),
isJavac ? "error" : "Error");
assertThat(exception).hasMessageThat().contains(expectedMessage);
});
}

Expand Down

0 comments on commit ed807b5

Please sign in to comment.