Skip to content

Commit 18ad08d

Browse files
authored
Merge pull request #33 from Addepar/joeaxe/BILLING-2504
BILLING-2504: Allow buck to run tests on nested test classes
2 parents ec1a93b + f3771a8 commit 18ad08d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/com/facebook/buck/testrunner/JUnitRunner.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,13 @@ private boolean mightBeJunit5TestClass(Class<?> klass) {
170170
return true;
171171
}
172172
}
173+
174+
for (Class<?> c : klass.getDeclaredClasses()) {
175+
if (c.getDeclaredAnnotation(org.junit.jupiter.api.Nested.class) != null) {
176+
return mightBeJunit5TestClass(c);
177+
}
178+
}
179+
173180
return false;
174181
}
175182

0 commit comments

Comments
 (0)