aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2016-12-16Partially revert "Patch to make it compile against JUnit 4.10 and run on ↵android-o-preview-1o-previewPaul Duffin
Android" This partially reverts commit 6774bdc0447b72a618eab51772685010afd5647a. Bug: 33613916 Test: make checkbuild Change-Id: Iac008952ff1a0e6f89d8862e817a8b2480dcbb28
2016-07-21Patch to make it compile against JUnit 4.10 and run on AndroidPaul Duffin
The main issues are: * JUnit 4.10 does not support giving Description instances a unique id, separate to its display name. * JUnit 4.10's BlockJUnit4ClassRunner.validateFields(List) method is private so cannot be overridden. * JUnit 4.10 requires test classes to be static. * JUnit 4.10 has no assertNotEquals() methods. * Some of the tests need to be run from the project's root directory in order to access file system resources. As a result those tests do not work when run on the device and so they are marked with @Ignore. Bug: 30244565 Test: Ran the junit-params-test using vogar Change-Id: I8f1bd602d07bedec1340373ad5747e3565ce617d
2016-07-20Fix dependency on undefined order of Class.getMethods()Paul Duffin
The Class.getMethods() returns an array of methods from a class and its interfaces and super class but specifies that the order is undefined. The affected test indexes the array using an index of 0, presumably because it assumes that the method defined in the class comes before methods defined in the super class and interfaces. This is a bug in the upstream repository and is separated out from the other patches to make it easier to push it to the upstream repository. Bug: 30244565 Change-Id: I9e267b53614a46497e04c73841d086b83b536570 Test: Once it compiles the tests will be run.
2016-07-20Workaround Android's lack of java.beans.PropertyEditor/ManagerPaul Duffin
The classes are used to allow developers to customize JUnitParams' handling of conversion from literal String values to the type of parameters required by the parameterized test methods. This simply removes the code that uses the classes. That means developers who require custom data types will have to accept String parameters in their parameterized test methods and do the conversions manually. Bug: 30244565 Change-Id: I0dd479591d6fb60f0a08025c51ab3c9494c1bda2 Test: Once it compiles the tests will be run.
2016-07-20Initial checkin of JUnitParams-1.0.5Paul Duffin
Adds README.version, README.google, MODULE_LICENSE_APACHE2 files as required by the process (see b/30087411). The code does not yet compile; it requires patching to work with Android API and JUnit 4.10. Those patches will be added in separate commits to make it easy to identify the Android specific changes. All the changes will be submitted together. Bug: 30244565 Change-Id: Icf556377478c3afdd644c5e4db0ff18898f496ae Test: Once it compiles the tests will be run.