Java: exclude abstract classes

This commit is contained in:
Jami Cogswell
2025-03-21 16:11:11 -04:00
parent b08c8d020d
commit ed57bc7858
3 changed files with 27 additions and 3 deletions

View File

@@ -44,4 +44,19 @@ public class AnnotationTest {
public void test() {
}
}
public abstract class Test7 { // COMPLIANT: Abstract inner test classes don't need `@Nested`
@Test
public void test() {
}
}
// COMPLIANT: Invalid to use `@Nested` on an abstract class, but
// this matter is out of scope (see QHelp Implementation Notes)
@Nested
public abstract class Test8 {
@Test
public void test() {
}
}
}