Java: tests to inline expectations

This commit is contained in:
Jami Cogswell
2025-03-21 15:33:15 -04:00
parent f17e7266cf
commit b08c8d020d
3 changed files with 8 additions and 4 deletions

View File

@@ -9,7 +9,8 @@ public class AnnotationTest {
}
}
public class Test2 { // NON_COMPLIANT: Inner test class is missing a `@Nested`
// NON_COMPLIANT: Inner test class is missing `@Nested`
public class Test2 { // $ Alert
@Test
public void test() {
}
@@ -35,8 +36,10 @@ public class AnnotationTest {
}
}
// COMPLIANT: Invalid to use `@Nested` on a static class, but
// this matter is out of scope (see QHelp Implementation Notes)
@Nested
public static class Test6 { // COMPLIANT: Although invalid, this matter is out of the scope (see Implementation Details)
public static class Test6 {
@Test
public void test() {
}