Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Kotlinc to v2_0_10 #4388

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading