diff options
author | Paul Duffin <paulduffin@google.com> | 2019-03-21 10:32:41 +0000 |
---|---|---|
committer | Paul Duffin <paulduffin@google.com> | 2019-03-21 14:45:58 +0000 |
commit | 4ba14531644df44a0081caa2de9423d57553fb63 (patch) | |
tree | af56818082fb8d6a749f08406ffe86a65cbb064d /annotations/generate_annotated_java_files.py | |
parent | 308ec2cae396d22e6dd3c66c361012651344ad63 (diff) |
Add JUnit 4 TestRule for running tests with a specific target SDK
Refactors code to replace lots of custom code for testing behavior for
specific target SDK versions, whether it is try...finally... blocks or
methods using lambdas with a JUnit 4 TestRule.
As the tests were JUnit 3 that also required switching them from
extending TestCase to extending TestCaseWithRules which adds support
for JUnit 4 TestRules to TestCase.
This is preparation work for some follow up work on ObjectStreamClass.
Test: atest \
core-tests:org.apache.harmony.tests.java.io.ObjectStreamClassTest \
core-tests:libcore.java.lang.OldRuntimeTest \
core-tests:libcore.java.lang.PackageTest \
core-tests:libcore.java.lang.reflect.annotations.AnnotationsTest \
core-tests:libcore.java.util.CollectionsTest \
core-tests:org.apache.harmony.regex.tests.java.util.regex.PatternTest \
core-tests:libcore.junit.util.SwitchTargetSdkVersionRuleTest
Bug: 109930347
Change-Id: I4ea11288eb344eaeb2e6cc9f3225748e518e1827
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions