Skip to content
Commit bd96f408 authored by Paul Duffin's avatar Paul Duffin
Browse files

Clean up TestCaseUtil

Part of the work of removing JUnit and dependent android.test classes
from the Android API involves providing a static library that developers
can include in their test applications to ease migration. That library
will be built directly from the source (as opposed to android.jar which
is built from stubs) and so developers will be able to see classes and
methods that are not present in the stubs. This change is one of a
number of similar changes that cleanup the existing non-API code in
order to minimize the additional methods and classes exposed externally.
The basic approach is to remove unused classes and methods, use least
visible access modifier possible and generally minimize the amount of
publicly visible code.

TestCaseUtil.getTestCaseNames() is only used by tests but its tests did
provide some coverage of the getTests() method so remove the method and
the tests the method was simply moved into TestCaseUtilTest and the
tests renamed to make it clearer that they are testing
TestCaseUtil.getTests().

Similarly, TestCaseUtil.createTestSuite() was only used by tests but its
tests did provide some coverage of the invokeSuiteMethodIfPossible()
method so the tests were modified and renamed to preserve that coverage.

TestCaseUtil.getTestAtIndex() was completely unused so was just removed.

Bug: 30188076
Test: make checkbuild and ran FrameworkTestRunnerTests
Change-Id: I62bbdbab428d7560f0c7df11f313fe60cfd31d13
parent 2a637cf9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment