summaryrefslogtreecommitdiffstats
path: root/luni/src/test/java/tests
Commit message (Collapse)AuthorAgeFilesLines
* libcore: use default SecureRandom in KeyGen DSA testsSergio Giro2015-06-262-6/+2
| | | | | | | | | | | | While generating key pairs, BouncyCastle checks that random numbers are strong enough. Tests were using a mock random generator that generates the constant 10. Bug: 19657861 (cherry picked from commit 098bc41d846f847a6551209d65dbb74bfea3bb00) Change-Id: Ifd1401f9b386e4039b8f51af65e5e7dc5fad15e2
* Fix CertificateTest#testVerifyPublicKeyString2Narayan Kamath2015-06-151-8/+7
| | | | | | | Use a provider that can handle the provided public-key. bug: 21816913 Change-Id: Iee7a932a8767c4c1b781636dfb9456a1b604532f
* Use milliseconds to avoid timezonesKenny Root2014-09-121-1/+1
| | | | | | | | Using Date will interact with timezones, so use milliseconds which bypasses this. Bug: 17442302 Change-Id: I6bd73efb95f0f427f31812ce10c32a5af3987ca0
* Add CRLReason and friendsKenny Root2014-05-081-0/+167
| | | | | | | New API for getting the revocation reason. Add tests and exceptions associated with it. Change-Id: Ifd6444ab966c984312f069a6ee330d255110ea85
* Disallow explicit signs in java.sql.Date#valueOf()Calin Juravle2014-04-221-0/+50
| | | | | Bug: 5239391 Change-Id: I52bd621bd6ed46d1ae01abf1be25d1ac3c76d7e0
* Move tests from tests/api to harmony-tests. (Take 2)Narayan Kamath2013-11-15404-156574/+0
| | | | | | | This reverts commit d5e281743e55e1daa297fd8043b2d9b6e8e1bed2. The makefile issue that caused the original build break has been resolved.
* Revert "Move tests from tests/api to harmony-tests."Narayan Kamath2013-11-15404-0/+156574
| | | | | | | | This reverts commit 81bf28ad31131815d0a36a43a0eca3c29aefdfcd. Breaks build Change-Id: I3f1562921ffe8fdbec36971dd65db398c27c92db
* Move tests from tests/api to harmony-tests.Narayan Kamath2013-11-15404-156574/+0
| | | | | | | The vast majority of cleaned up harmony tests are now in harmony-tests/src/test/org/apache/harmony/tests/ Change-Id: I56c2e484ff434b5618cf6751d602ae9f0db96b30
* Merge "Fix CookieStoreTest & CookieManagerTest"Narayan Kamath2013-11-152-28/+21
|\
| * Fix CookieStoreTest & CookieManagerTestNarayan Kamath2013-11-142-28/+21
| | | | | | | | Change-Id: I64642978a3f3f50d55267d642af20afbfa6ed4d6
* | Merge "Import resources, fix JarURLConnectionTest."Narayan Kamath2013-11-151-33/+31
|\ \
| * | Import resources, fix JarURLConnectionTest.Narayan Kamath2013-11-141-33/+31
| |/ | | | | | | | | | | The test case with the escaped URL still fails. Change-Id: Iae3a58fea800d8b981cb09474d1fa77b7c361e4e
* | Merge "Fixes for URLTest & HttpCookieTest"Narayan Kamath2013-11-152-181/+43
|\ \
| * | Fixes for URLTest & HttpCookieTestNarayan Kamath2013-11-142-181/+43
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | URLTest: Unlike the RI, we return the empty string instead of null for missing authorities. In addition, URL#getFile() will always return files with a leading "/". HttpCookieTest: The test suffered from some pretty serious misunderstandings of the cookie spec. There's still a failure where we accept a negative max-age attribute (we shouldn't). Change-Id: Ia6646cd512fc1280033c0d37d8773bfd12e7f79a
* | Merge "Fix PropertiesTest, delete ServiceLoaderTest & PackageTests."Narayan Kamath2013-11-153-1021/+26
|\ \
| * | Fix PropertiesTest, delete ServiceLoaderTest & PackageTests.Narayan Kamath2013-11-143-1021/+26
| |/ | | | | | | | | | | | | | | The two tests have been deleted because they do stuff that's unsupported and also because most of their functionality is duplicated in existing tests. Change-Id: Ie63bce1c402970c6679f5e843aee7dbe46593103
* | Merge "Fix TreeMapTest & TreeMapExtendTest."Narayan Kamath2013-11-152-198/+206
|\ \
| * | Fix TreeMapTest & TreeMapExtendTest.Narayan Kamath2013-11-142-198/+206
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The main points of disagreement between harmony and us was : (1) They allowed a singleton null key in their maps even when the comparator disallowed it (2) Their implementations of various NavigableMap functions were inconsistent. In particular, we throw correctly when tailMap / headMap refer to a key that's outside the restrictred range of a map. Change-Id: I26918a6e484a65ae03d53eaff887fe4c3cd7a7e0
* | Merge "Fix numerous harmony test failures"Narayan Kamath2013-11-159-264/+120
|\ \
| * | Fix numerous harmony test failuresNarayan Kamath2013-11-159-264/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ProcessBuilderTest : Don't execute java -version on the device. String2Test: Don't make assumptions about the order of the BOM. ThreadTest: We don't support Thread#destroy ControlTest : Fix bogus URL, this test still needs some work IdentityHashMap2Test : Fix bogus asserts. Also don't make assumptions about the implementations of Integer#tostring. The test was failing because Integer cached string reps of "small" integers. SimpleEntryTest / SimpleImmutableEntryTest : Don't rely on broken harmony TreeMap behaviour that allowed null keys. TimeZoneTest: Add vogar specific workaround & update display names. Change-Id: Ie3204917e1d729b0f4ac3bdcbf61fc6a54ab9387
* | | Merge "Import resource and fix ClassTest."Narayan Kamath2013-11-151-21/+4
|\ \ \
| * | | Import resource and fix ClassTest.Narayan Kamath2013-11-131-21/+4
| | |/ | |/| | | | | | | | | | | | | (Still fails on resources that have a # though) Change-Id: I41b2657a57dd06ea1fd61de157ff4e8ea8bba7ac
* | | Merge "Delete unsupported classloader tests."Narayan Kamath2013-11-151-176/+2
|\ \ \
| * | | Delete unsupported classloader tests.Narayan Kamath2013-11-131-176/+2
| |/ / | | | | | | | | | Change-Id: I74eb4b24c975b2eeafb177431ec42b578772c743
* | | Merge "Fix various serialization tests."Narayan Kamath2013-11-155-477/+52
|\ \ \
| * | | Fix various serialization tests.Narayan Kamath2013-11-135-477/+52
| |/ / | | | | | | | | | | | | | | | | | | Some of these tests were plain wrong, and the others were based on a wrong interpretation of the spec. Change-Id: I8fc39fbf6e98544d04cb6bbb9a2ae852b5ea1a4d
* | | Merge "Fix up ObjectStreamClassTest"Narayan Kamath2013-11-151-39/+6
|\ \ \
| * | | Fix up ObjectStreamClassTestNarayan Kamath2013-11-131-39/+6
| |/ / | | | | | | | | | | | | | | | | | | Change path references and remove a test case that we don't support. Change-Id: I708a2823a8fe7d69e88b74838452bb7aa7532dca
* | | Merge "Fix up FileTest"Narayan Kamath2013-11-151-29/+10
|\ \ \
| * | | Fix up FileTestNarayan Kamath2013-11-131-29/+10
| |/ / | | | | | | | | | | | | | | | | | | Remove a pointless test & return early from a test that won't work if the user is root. Change-Id: I5138497205a8bd1a10aa82fc83a8d207628fef0e
* | | Merge "Fix FileInputStreamTest"Narayan Kamath2013-11-151-17/+4
|\ \ \
| * | | Fix FileInputStreamTestNarayan Kamath2013-11-131-17/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | test_close_shared_fd was testing the wrong thing. Also removes some pointless test code from the same method. Change-Id: I508ddd614a67ce450480abd4557079c672fbe1ad
* | | Merge "Fix a few failures in FileURLConnectionTest."Narayan Kamath2013-11-151-9/+7
|\ \ \ | |_|/ |/| |
| * | Fix a few failures in FileURLConnectionTest.Narayan Kamath2013-11-141-9/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Some tests still fail, but they appear to be valid tests. There are at least two separate issues here : - ClassLoader#getResource seems to be constructing a bogus URL (at least in this context). findResource returns a non null URL, but URL#openStream throws. - URLs with fragments (#foo) don't appear to work correctly. Change-Id: Iabf03e49c56659039feb85a0e528efcaaed0b49d
* | Add serialization golden files, fix tests.Narayan Kamath2013-11-131-13/+11
|/ | | | | | | | | - Moves a few golden files from luni/ to harmony-tests/ - Delete dead code in SerializationTester - Fix a bug in SerializationTest (not sure how this ever worked for resources with "." in their name) Change-Id: Ia5b1376f4ada9b9c706a266ae077debeea5b1f29
* Add untracked harmony tests.Narayan Kamath2013-11-13236-0/+98597
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been deduped against : libcore/luni/src/test/java/org/apache/harmony/luni/tests libcore/luni/src/test/java/tests/api/ libcore/harmony-tests/src/test/java/tests/api This is a minimal change that builds the entire test suite. Many tests don't pass yet, they will be fixed in follow ups. Notable tests that haven't been moved: - ExcludedProxyTest: Might make requests to (now defunct) external servers. All of this code is tested in okhttp. - URLClassLoaderTest: Has a dependency on jetty, tested in okhttp. Notable test cases that haven't been moved: - URLTest: overlap with okhttp, might make requests to external servers. - ServerSocketTest#test_init: Uses Support_execJava, which we don't support yet. Isn't testing anything useful. - FileTest#testDeleteOnExist: Uses Support_execJava which we don't support yet. This is a useful test and we must ressurect it if at all possible. bug: 11650799 Change-Id: Ib277eb0bad465ea72b090168490a1a633611b3f3
* Dedup tests under api with apache-harmony.Narayan Kamath2013-11-1322-1391/+5729
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This batch of changes deals with harmony tests that are already present under luni/src/test/java/tests/api. I chose the tests/api folder for deduplication because it contains a large number of tests, and all of them are harmony derived. Once this change is submitted, I'll submit follow up changes to (1) Move all tests from api/ to libcore/harmony-tests/ (2) Copy untracked harmony tests from external/ to libcore/harmony-tests/ (3) Move tests libcore/luni/s/test/java/org/apache into libcore/harmony-tests libcore/harmony-tests will then become the canonical source for all harmony tests & harmony derived tests. At this point, we can stop adding test cases to libcore/harmony-tests and instead add them to libcore/luni/src/test/java/libcore/ The following tests were exact copies and needed no additional changes. Process2Test.java, ProcessTest.java PhantomReferenceTest.java ReferenceQueueTest.java ReferenceTest.java SoftReferenceTest.java WeakReferenceTest.java AccessibleObjectTest.java ArrayTest.java ConstructorTest.java FieldTest.java GenericSignatureFormatErrorTest.java InvocationTargetExceptionTest.java AbstractQueueTest.java AbstractSequentialListTest.java CalendarTest.java ConcurrentModTest.java concurrentModificationExceptionTest.java EmptyStackExcepionTest.java EnumMapTest.java EnumSetTest.java FormattableFlagsTest.java HashSetTest.java LinkedHashMapTest.java LinkedHashSetTest.java MissingResourceExceptionTest.java NoSuchElementExceptionTest.java ObservableTest.java SampleBundleClass.java SimpleTimezoneTest.java TimerTaskTest.java TimerTest.java A follow up change will deal with harmony tests that aren't in this directory yet. bug: 11650799 Change-Id: I04b1168601152f81c12abb31d3b1156975b15187
* Add Random serialization testKenny Root2013-10-251-0/+22
| | | | | | This makes sure we don't mess up the serialization format in the future. Change-Id: Ied814b1ae5dedf2865239304d27af5f8388e5a83
* Remove bogus @test comments that confuse vogar.Elliott Hughes2013-08-233-33/+3
| | | | | | | They should be @tests, but they're useless anyway. (If there weren't so many, I'd remove all the @tests comments too.) Change-Id: I6d34a77c48d7d0bac075758453fd0d29f6f9901c
* Remove the isLocaleAvailable hacks.Elliott Hughes2013-07-232-16/+5
| | | | Change-Id: I17596301630f6c8d98c4415fe358f4fffb47b2d4
* Fixes for icu4c 51.Elliott Hughes2013-07-181-6/+1
| | | | | | | | | | | Change getYesterdayTodayAndTomorrow to cope with the new data layout. Extend getDateFormatOrder to cope with 'G' in fa's preferred yyyyMMdd pattern. Fix a few tests to correspond to data changes. Change-Id: I2478ae960ff6ec0b9a95290132c0ae0d5d8eff5a
* Fix tests.api.java.lang.ProcessTest#test_getErrorStream.Elliott Hughes2013-06-271-1/+1
| | | | | | | | Our new getopt_long(3) distinguishes between illegal, invalid, unrecognized, ambiguous, and unknown options; the old one only had ambiguous and [two slight variants of] unknown. Change-Id: Iec4f124d66e4e483292043db5a93caa4cf1a15b0
* Improve ProcessManager.Elliott Hughes2013-05-071-169/+96
| | | | | | | | | | Previously we'd leave zombies around if chdir(2) or execvp(2) failed. We also used to unnecessarily make 32Ki close(2) calls for every child. This patch fixes both problems and makes the tests less meaningless. Bug: https://code.google.com/p/android/issues/detail?id=55017 Change-Id: I23ecc84aedd6650dbe6df19b4b0c2e6429578e50
* Replace mentions of old JSSE package nameKenny Root2013-05-031-1/+1
| | | | Change-Id: I7c90b08ee2b43c73e02512d0c6caaec098967e93
* TimerTest cleanupBrian Carlstrom2013-04-251-339/+147
| | | | | Bug: 8657701 Change-Id: If3cb0892b63a1dff00ab33b92065ca54cc174123
* Fix BigInteger small prime generation.Elliott Hughes2013-04-121-837/+26
| | | | | | | | | | OpenSSL won't generate primes smaller than 16 bits, so do it ourselves roughly the same way they would. Also remove pure duplicate tests from OldBigIntegerTest, and add some new tests to the modern BigIntegerTest. Change-Id: I3000942a7a4f2359d5cbe28795b4f8dd96715ef8
* Fix BigInteger test failures.Elliott Hughes2013-04-101-4/+2
| | | | | | | | We were hitting a couple of OpenSSL bugs. I've reported them upstream, and work around them in the meantime. Bug: 2943474 Change-Id: Ia06bcf3025f525a954d9b918669d09531631a266
* Check the EE's eKU extension field, if present.Chris Palmer2013-04-061-94/+33
| | | | | | | BUG=https://code.google.com/p/chromium/issues/detail?id=167607 and https://b.corp.google.com/issue?id=7920492 Change-Id: Ib917c3a4a8ea6a12f685c44056aa44aa414d45e6
* Merge "Move the external/apache-harmony/math tests into libcore."Elliott Hughes2013-04-061-1/+1
|\
| * Move the external/apache-harmony/math tests into libcore.Elliott Hughes2013-04-041-1/+1
| | | | | | | | Change-Id: Ic4acfcf8553e0108e6ad127afa2745bb551acba3