Switch to using standard JUnit
There could be a slight performance degradation when running
a single test from within a TestSuite. That is because standard
JUnit creates instances of TestCase classes eagerly when they
are either added to a TestSuite or when a TestSuite is
constructed from the class whereas the vogar version did it
The impact is not certain because it depends on whether vogar
uses its version of TestSuite or the one provided by Android
itself. If it is the latter then then this will have no impact
If there is a performance impact then it will affect the use
1) vogar runs an explicitly specified subset of methods from
tests retrieved from a Test suite() method.
2) The suite() method creates a TestSuite directly from class X.
In that case vogar will now create one instance of class X for
each method in it and then discard all but the method being run.
Unless class X has a very expensive constructor and/or lots of
methods that should not be a problem for most users.
It will also cause an increase in the memory usage of tests run
as part of a TestSuite returned by a suite() method. That is
because the lifespan of the Test objects will be longer be
limited to the time spent running the individual test but
instead will be the duration of the whole test run.
Running a package of tests or even a list of test classes
explicitly specified on the command line would not be affected.
All these issues will be rectified after vogar has been
refactored to use JUnit to actually run the tests. That is
either because JUnit already supports what is needed or because
its behavior will be customized so it works well on Android.
The only change made to the tests is to add @Override
annotations onto SuiteReturnsCustomTest.CustomTest's
implementations of junit.framework.Test's methods. They could
not be added in prior to this because of the conflict with
Vogar's own copy of the Test class which this change removed.
18 files changed