aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
Commit message (Collapse)AuthorAgeFilesLines
* Fix JUnitParamsRunner so it works with CTS sharding am: b03560c325 am: ↵android-vts-8.0_r2android-vts-8.0_r1oreo-devPaul Duffin2017-06-0914-419/+487
| | | | | | | | | | 2f41cd20c0 am: f58521195e am: 55edd63fa3 Bug:38419944 Change-Id: Idb0cf19a4fb6d7e9b6161a708c8c582f4393fdc4 (cherry picked from commit bf41e5d5462598381b2fe3ce7e0d5303450a4ca6)
* Hard code text case name template for AndroidJUnitRunner and CTSPaul Duffin2017-03-241-2/+9
| | | | | | | | | | | | | | | | | | | | AndroidJUnitRunner and CTS require test names to be a specific format. The default JUnitParams format is not suitable. This change forces it to one that is suitable and prevents it from being overridden using the @TestCaseName annotation. These are a sample of parameterized and unparameterized test names. The latter two are from a JUnitParamsRunner based test. libcore.java.net.FtpURLConnectionTest#testOutputUrl pass libcore.java.net.IDNTest#test_toUnicode_failures pass libcore.java.net.InetAddressTest#test_getByName_invalid[0] pass libcore.java.net.InetAddressTest#test_getByName_invalid[1] pass Bug: 36074730 Bug: 36541809 Test: run cts -m CtsLibcoreTestCases and check test names of parameterized tests, e.g. those from libcore.java.net.InetAddressTest Change-Id: Id9a8f8ce9affeb85fb2f410d11e764e99d7287b3
* Make sure that filters affect the DescriptionPaul Duffin2017-03-221-0/+3
| | | | | | | | | | | | JUnitParamsRunner caches the Description on first request but if that happens before applying a filter then the Description never gets updated. This fixes the problem by discarding the cached Description forcing it to be regenerated next time it is requested. Bug: 36074730 Test: run cts -a arm64-v8a -m CtsLibcoreTestCases -t libcore.java.net.InetAddressTest#test_isReachable_by_ICMP Change-Id: Ibc35c013c388f81fd5b69c553b167e3d11af6841
* Partially revert "Patch to make it compile against JUnit 4.10 and run on ↵android-o-preview-1o-previewPaul Duffin2016-12-163-17/+5
| | | | | | | | | | Android" This partially reverts commit 6774bdc0447b72a618eab51772685010afd5647a. Bug: 33613916 Test: make checkbuild Change-Id: Iac008952ff1a0e6f89d8862e817a8b2480dcbb28
* Patch to make it compile against JUnit 4.10 and run on AndroidPaul Duffin2016-07-213-5/+17
| | | | | | | | | | | | | | | | | | 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
* Workaround Android's lack of java.beans.PropertyEditor/ManagerPaul Duffin2016-07-201-7/+0
| | | | | | | | | | | | | | | | 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.
* Workaround Android's lack of javax.lang.model.type.NullTypePaul Duffin2016-07-204-10/+4
| | | | | | | | | | | | | The NullType class is used as a default value to indicate that the @Parameters source attribute has not been explicitly set. As such while it is externally visible it is not something that clients would be depending upon. Clients are highly unlikely to either check the source attribute themselves, or specify a value of Void.class so this change should be safe. Bug: 30244565 Test: Once it compiles the tests will be run. Change-Id: If2d1c73e81aabc98f1431206279e82e9e043f4c0
* Initial checkin of JUnitParams-1.0.5Paul Duffin2016-07-2040-0/+2633
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.