Skip to content

Commit

Permalink
Merge pull request #33 from Addepar/joeaxe/BILLING-2504
Browse files Browse the repository at this point in the history
BILLING-2504: Allow buck to run tests on nested test classes
  • Loading branch information
JoeAxeAddepar authored Feb 4, 2025
2 parents ec1a93b + f3771a8 commit 18ad08d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/com/facebook/buck/testrunner/JUnitRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@ private boolean mightBeJunit5TestClass(Class<?> klass) {
return true;
}
}

for (Class<?> c : klass.getDeclaredClasses()) {
if (c.getDeclaredAnnotation(org.junit.jupiter.api.Nested.class) != null) {
return mightBeJunit5TestClass(c);
}
}

return false;
}

Expand Down

0 comments on commit 18ad08d

Please sign in to comment.