summaryrefslogtreecommitdiffstats
path: root/harmony-tests
Commit message (Collapse)AuthorAgeFilesLines
* am 47c61891: am 31e8ef04: Merge "Fix race condition in WeakHashMapTest."Mathieu Chartier2014-06-241-6/+11
|\ | | | | | | | | * commit '47c61891491acce74675622abf3132ff03464ae5': Fix race condition in WeakHashMapTest.
| * am 31e8ef04: Merge "Fix race condition in WeakHashMapTest."Mathieu Chartier2014-06-241-6/+11
| |\ | | | | | | | | | | | | * commit '31e8ef04eb3bc2029eb94393c3ce87245dd75da2': Fix race condition in WeakHashMapTest.
| | * Fix race condition in WeakHashMapTest.Mathieu Chartier2014-06-231-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a race condition where the reference queue daemon wouldn't necessarily have processed the cleared references by the time we called WeakHashMap.size(). The race is fixed by doing a busy wait with a 5 second timeout. This should't increase the test time in the average case since the cleared weak references should be processed shortly after induceFinalization finishes. Bug: 15775475 Change-Id: I66350b6c87252e98bfbd945fe1f96bef58ec24a9
* | | am 3568b562: am c477bf9e: Merge "Unimplement Console.readPassword and remove ↵Neil Fuller2014-06-231-6/+0
|\ \ \ | |/ / | | | | | | | | | | | | | | | test" * commit '3568b5622585cdde1f15503784971653710fc2aa': Unimplement Console.readPassword and remove test
| * | am c477bf9e: Merge "Unimplement Console.readPassword and remove test"Neil Fuller2014-06-231-6/+0
| |\ \ | | |/ | | | | | | | | | * commit 'c477bf9eaf4553ed55b9d26c6bd65be3cc5665c6': Unimplement Console.readPassword and remove test
| | * Unimplement Console.readPassword and remove testNeil Fuller2014-06-231-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ConsoleTest.test_readPassword* fails CTS tests. Context: Under standard Android applications the System.console() method will return null. The Console.readPassword() method must turn off echo. Under automated tests the ConsoleTest is exercising a Console object with fake stdout / stdin streams to get around the absence of a System.console(). setEcho() is hardcoded to use stdin / stdout in the native code. Under the test runners stdin / stdout are not connected to a TTY leading to a ENOTTY. Under Android readPassword is unimportant. Rather than leaving untested security-related code the password methods are being unimplemented. It is unlikely this code has ever been used on Android given the absence of a System Console instance. Bug: 12491103 Change-Id: I755c014e6b53236f5bef0535be137dd721918b44
* | | am 8c83d2aa: am 2eb56b69: Merge "Fix CurrencyTest.test_getSymbol for unknown ↵Neil Fuller2014-06-191-41/+18
|\ \ \ | |/ / | | | | | | | | | | | | | | | variants" * commit '8c83d2aa1fd7b7e3f9ca7415f9dfdf94de1314ec': Fix CurrencyTest.test_getSymbol for unknown variants
| * | am 2eb56b69: Merge "Fix CurrencyTest.test_getSymbol for unknown variants"Neil Fuller2014-06-191-41/+18
| |\ \ | | |/ | | | | | | | | | * commit '2eb56b69de339978a29d94531759b465742f027f': Fix CurrencyTest.test_getSymbol for unknown variants
| | * Fix CurrencyTest.test_getSymbol for unknown variantsNeil Fuller2014-06-181-41/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The behavior of CurrencyTest.getSymbol has changed since K for unrecoginzed locales. Commit de0eb683370d789e7bb25673b350b8dbf2ba5d69 now means the ICU default locale is set when the Java default locale is changed. Previously it would have been left unset and would have fallen back to using the system settings (most likely US or UK English during tests). The test is setting the Java default locale to "kr-KR" (a locale unrecognized by ICU) and requesting the currency symbol for USD for locale "kr-KR" (still unrecognized by ICU). Before the commit: Because the kr-KR argument is unrecognized ICU tries the ICU default (which was unset and so picked system setting of en). It returned "$". After the commit: As above, but now the ICU default is set to kr-KR. Since there is no entry for USD in the default it falls back to "root", and returns the value found there: "US$". Behavior when the default locale is unrecognized is edge-case and arguably it is no more / less correct before or after this commit. The test has been updated to reflect the new value + some tidy up of the test generally. This change also contains a more focused test that demonstrates the behavior in ICU and adds documentation to make ICU slightly clearer. Arguably neither the new ICUTest nor the existing CurrencyTest code should exist because they assert edge-case behavior that Android may wish to change in future. Bug: 14821275 Change-Id: I8beb6004b0c37d2fe59855d13d2c8e2e6fe1c530
* | | am 4aadbe01: Merge "Remove more." into lmp-preview-devAnwar Ghuloum2014-06-171-2/+0
|\ \ \ | | | | | | | | | | | | | | | | * commit '4aadbe01b75956c4a1c5af56723e5e6e3da25c47': Remove more.
| * \ \ Merge "Remove more." into lmp-preview-devAnwar Ghuloum2014-06-171-2/+0
| |\ \ \
| | * | | Remove more.Elliott Hughes2014-06-171-2/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: Idaf030cd369e728ec37df7107cd30062db899b7c
* | | | | resolved conflicts for merge of 63744c88 to masterElliott Hughes2014-06-176-197/+115
|\ \ \ \ \ | |/ / / / | | | | | | | | | | Change-Id: I2dbbda225d0fbe61da34f93abbb466ed490ba405
| * | | | Remove.Elliott Hughes2014-06-176-197/+115
| |/ / / | | | | | | | | | | | | Change-Id: Ibf79a402e1bad98a262e380fcee3d35c127ae6d5
* | | | am 4a35ec7e: am 2b931177: Merge "Tidy up MulticastSocketTest and fix ↵Neil Fuller2014-06-161-340/+307
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | execution on hammerhead" * commit '4a35ec7e9eacc403a904d83df09a7bd762ebec0f': Tidy up MulticastSocketTest and fix execution on hammerhead
| * | | am 2b931177: Merge "Tidy up MulticastSocketTest and fix execution on hammerhead"Neil Fuller2014-06-161-340/+307
| |\ \ \ | | | |/ | | |/| | | | | | | | | * commit '2b9311770bc531f15edb43f382696f3954a7c4e8': Tidy up MulticastSocketTest and fix execution on hammerhead
| | * | Merge "Tidy up MulticastSocketTest and fix execution on hammerhead"Neil Fuller2014-06-101-340/+307
| | |\ \
| | | * | Tidy up MulticastSocketTest and fix execution on hammerheadNeil Fuller2014-06-111-340/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the fixes for DatagramChannelMulticastTest in 6d7b081971d12b25426c46e4989e7df3a5995eae but for java.net.MulticastSocket. Because MulticastSocketTest was the genesis of DatagramChannelMulticastTest it had similar issues to that one, but also contained other unnecessary or badly formatted code. The main changes here are: 1) Fix the tests that were implicitly assuming that the IPv6NetworkInterface1 was the same interface as the IPv4 version (networkInterface1). 2) Renamed variables / moved setUp to the top of the class / closed sockets after use / fixed try/catch blocks to only wrap expected throwing code / pulled out common code into new methods and generally tidied up. 3) Removed the use of the "MulticastServer" class entirely. This "server" would listen to socket on a separate thread and was the source of multiple Thread.sleep(1000) calls in the test. The tests rely exclusively on multicast loopback mode anyway (MulticastSocket.setLoopbackMode()) and MulticastSocket.receive() is blocking, which means it either gets an immediate result or the test can rely on the setSoTimeout() method to limit the time spent waiting. The use of multiple threads was therefore unnecessary. Bug: 15509450 Change-Id: Ie448cc3b2d7432012957db34c72949a7b4da359f
* | | | | am 3dc2e67e: am 995dc174: Merge "Tests for Runtime.*Memory()"Neil Fuller2014-06-111-13/+23
|\ \ \ \ \ | |/ / / / | | | | / | |_|_|/ |/| | | * commit '3dc2e67e393d89902fac3deee351ee20cde3d2e3': Tests for Runtime.*Memory()
| * | | am 995dc174: Merge "Tests for Runtime.*Memory()"Neil Fuller2014-06-101-13/+23
| |\ \ \ | | |/ / | | | | | | | | | | | | * commit '995dc1746d6723734892b348e8faf627d830695e': Tests for Runtime.*Memory()
| | * | Tests for Runtime.*Memory()Neil Fuller2014-06-101-13/+23
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The docs describe a condition we do not test for. The freeMemory / totalMemory tests have been consolidated into a single test and joined by an additional assertion for maxMemory(). The test for freeMemory from OldRuntimeTest has been tidied up and moved to RuntimeTest. Bug: 15507122 Change-Id: I4343215fb7f6b441613e25d3844d67812f5b5e94
| * | am 35f521cd: Merge "DO NOT MERGE : Fix for ↵Neil Fuller2014-06-091-2/+3
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | InetAddressTest#test_isReachableLjava_net_NetworkInterfaceII" into klp-modular-dev * commit '35f521cdcd0b877b3a3c4a7df631529a31cee45b': DO NOT MERGE : Fix for InetAddressTest#test_isReachableLjava_net_NetworkInterfaceII
| | * | DO NOT MERGE : Fix for ↵Neil Fuller2014-06-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InetAddressTest#test_isReachableLjava_net_NetworkInterfaceII This is speculative because the test passes for most devices making it difficult to test. The test was expecting IP 1.1.1.1 to be "unreachable". 1.1.1.1 may have special significance for the devices the test fails for or the test environment they are using. 1.1.1.1 is not a good choice for an "unreachable IP" since it is not only a valid IP, but it was assigned to Google. It is also like to be picked for (non-standard compliant) local networks due to its ease of typing. Switching the test to an IP address that should truly be unreachable should not break anything and may fix the test. This patch will also be applied to AOSP/master separately. Bug: 15453368 Change-Id: I4f7e5b95d72b4952716581a783f520f6a8d7392d
| | * | Merge "Fix broken CTS test" into klp-modular-devNarayan Kamath2014-05-141-303/+207
| | |\ \
| | | * | Fix broken CTS testNeil Fuller2014-05-141-303/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix is in test_isJavaIdentifierPartC() and reverses the assertion for Character.isJavaIdentifierPart('\u200b') from false to true. The test method below it (isIdentifierPart(int)) was already asserting this and the behavior has been confirmed against the RI. Other changes made: Uncommented some assertions that now pass, removed unnecessary / incorrect comments, added missing braces, some reformatting to 100 chars to improve readability, removed empty lines at the beginning of methods . Converted all assertTrue(msg, !condition); to assertFalse(msg, condition). Bug: 13748395 (cherry picked from commit 2a025c1955e9fccac12587c019f3ae82ff5505c3) Change-Id: I18ac7d2b0b8f87d4a13cb32113bbea1abe691a4a
| | * | | Fix remaining file related CTS Test failures.Narayan Kamath2014-05-148-210/+84
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most failures were because tests were trying to open files relative to the current working directory, instead of in a temp directory. FileTest was failing because it didn't construct paths correctly. It would add an additional separator char even if the path already ended with one. bug:14895550 bug:14893836 bug:14893333 (cherry picked from commit e10c61bb13373b95ba857cc3af60f94b9941ab9e) Change-Id: I083f6d5713fd55e44b7e14a9bef7ec136fac3ce4
| | * | Fix Hashtable CTS testNeil Fuller2014-05-121-88/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test assumed that the Enumeration returned from element() and keys() could be cast to Iterator. Even if it was previously ok, it isn't now and it is not part of the public API. Manual merge from aosp/master for klp-modular-dev. (cherry-pick of commit 4df29e1e1cf169ff6c77b8dd247de8c79b81d552 from aosp/master) Bug: 13747624 Change-Id: Ifc3acc0e70bad561f8d9aa443494b40ba0e37346
| | * | Merge "Fix UnicodeBlockTest." into klp-modular-devNarayan Kamath2014-05-121-81/+23
| | |\ \
| | | * | Fix UnicodeBlockTest.Narayan Kamath2014-05-121-81/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove negative tests for blocks that weren't assigned in Java6 but are currently assigned. Those tests weren't very useful anyway, since this class must serve as a test of our ICU glue and not of the underlying ICU data. Also removes a test for the deprecated SURROGATES_AREA member which we don't support to remain consistent with ICU's treatment of blocks in patterns. bug: 12491302 (cherry picked from commit 7ed285657c33638ed939da5b2751e02f8e42648e) Change-Id: I30313c7c63df1832b8fdc227bfe9cab46434d81d
| | * | | Remove test for unsupported GregorianCalendar functionality.Narayan Kamath2014-05-121-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also adds an explanatory comment and makes the intent of the implementation clearer without changing any of the functionality. TL;DR - there doesn't appear to be any sensible way to provide any sort of consisent semantics if we plan on supporting these fields. Partial cherry-pick from commit 5eea675931db0bf976c2347f4e3b7e4703d337a4. The implementation is left unmodified. bug: 12778197 Change-Id: I0f161967412a42c582ba60da1c96d0ce37a90bcf
| | * | | Blacklist a known failure in GregorianCalendarTest.Narayan Kamath2014-05-121-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issues here relate to how we deal with ambiguous wall clock times, i.e, wall clock values that we "skip" when we move the clock forward when transitioning into daylight savings, and wall clock times that occur twice when we move the clock backward This isn't a regression. We've never handled this correctly. bug: 12778197 (cherry picked from commit 3f2128b3408255e317f66c10c6dd5edbff53b3ee) Change-Id: If0fd5b5e0cb79363ffd3759c7cb6b2c63aabee82
| | * | | Fix GregorianCalendarTest#test_addII.Narayan Kamath2014-05-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're going through the trouble of accounting for DST changes in GregorianCalendar.add(int, int) (as per the spec), so adjust our tests to agree. bug: 12778197 (cherry picked from commit 1326a80ee854ad7df3ac183874734e418194572c) Change-Id: I92b072e2385c7fbd6fcac9de25eec7542d53e2d6
| | * | | Partially fix GregorianCalendarTest.Narayan Kamath2014-05-121-1/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ICU4C data (see icu4c/data/misc/supplementalData.txt) as well as the RI agree that the minimum number of days in the first week of the year should be 1 in canada. (I'm not a 100% convinced that this is correct, the canadian standards board claims to have implemented ISO 8601, which requires a 4 day minimum. However, that site links to several documents such as CSA Z234.5 that are not publicly accessible). (cherry picked from commit ce54057889055ab8c4cb45c51df0ca9ee09ebb43) Change-Id: I7d152ba1f157bfaffeac6c38c37828aaf0004cb2
| * | | resolved conflicts for merge of 8c208c01 to klp-modular-dev-plus-aospNeil Fuller2014-05-214-15/+7
| |\ \ \ | | | |/ | | |/| | | | | Change-Id: I54e57263e968e3f28ae07949d74d47f0907ab175
| | * | Deprecate use of BrokenTest and SideEffectBrett Chabot2014-05-214-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use expectations files instead. (cherry picked from commit 6a6b612286976cc185c898803fe51e4e062bd9eb) Bug: 12924356 Change-Id: I9b7e71805a80176c873cffe46bed65f81de1903d
* | | | am 100e8709: am c490e4dc: am 85cd6a19: Merge "Fix tests that relied on ↵Narayan Kamath2014-05-131-5/+6
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | ReferenceQueue ordering semantics." * commit '100e8709eff57f7803a6337d278a5c3b2cf12bb4': Fix tests that relied on ReferenceQueue ordering semantics.
| * | | am c490e4dc: am 85cd6a19: Merge "Fix tests that relied on ReferenceQueue ↵Narayan Kamath2014-05-131-5/+6
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | ordering semantics." * commit 'c490e4dc33f0fe2086ec8d9cd872b9a358801eab': Fix tests that relied on ReferenceQueue ordering semantics.
| | * | Fix tests that relied on ReferenceQueue ordering semantics.Narayan Kamath2014-05-131-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit eb3e5888d4b3 changed ReferenceQueue from LIFO to FIFO. Fix tests that were expecting it to be LIFO. Change-Id: I222513ddb091755fb27294939beb6565b661dd3d
* | | | am a053112a: am c1fa5983: am 52fb2230: Merge "Fix Hashtable CTS test"Neil Fuller2014-05-121-88/+18
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit 'a053112a228fa8df4e3692cdf2553ef96ae43602': Fix Hashtable CTS test
| * | | am c1fa5983: am 52fb2230: Merge "Fix Hashtable CTS test"Neil Fuller2014-05-121-88/+18
| |\ \ \ | | |/ / | | | | | | | | | | | | * commit 'c1fa59836cb9699e22b90eba7fa443e41ac9530e': Fix Hashtable CTS test
| | * | Merge "Fix Hashtable CTS test"Neil Fuller2014-05-121-88/+18
| | |\ \
| | | * | Fix Hashtable CTS testNeil Fuller2014-05-121-88/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test assumed that the Enumeration returned from element() and keys() could be cast to Iterator. Even if it was previously ok, it isn't now and it is not part of the public API. Bug: 13747624 Change-Id: I552a886711178708cbe7b6d87a976b6c1a839467
* | | | | am ee998bd7: am 3ba6fc84: am 0a2ddb63: Merge "Remove test for unsupported ↵Narayan Kamath2014-05-121-24/+0
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | GregorianCalendar functionality." * commit 'ee998bd77e0367865b524cdbd4a0659a0b5d8bd5': Remove test for unsupported GregorianCalendar functionality.
| * | | | am 3ba6fc84: am 0a2ddb63: Merge "Remove test for unsupported ↵Narayan Kamath2014-05-121-24/+0
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | GregorianCalendar functionality." * commit '3ba6fc848a3080c09326399793231323188dca91': Remove test for unsupported GregorianCalendar functionality.
| | * | | Remove test for unsupported GregorianCalendar functionality.Narayan Kamath2014-05-121-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also adds an explanatory comment and makes the intent of the implementation clearer without changing any of the functionality. TL;DR - there doesn't appear to be any sensible way to provide any sort of consisent semantics if we plan on supporting these fields. bug: 12778197 Change-Id: Iadaaaa5d4bdddec4aceca498ffc870edf2cbefed
* | | | | am 3ac87904: am c2ec0af0: am f7892a21: Merge "Fix UnicodeBlockTest."Narayan Kamath2014-05-121-81/+23
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit '3ac87904eeb5f902a02da18d2994fe87ae97bf6c': Fix UnicodeBlockTest.
| * | | | am c2ec0af0: am f7892a21: Merge "Fix UnicodeBlockTest."Narayan Kamath2014-05-121-81/+23
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | * commit 'c2ec0af034d1f432c38b3bf61b03ea8c266921d1': Fix UnicodeBlockTest.
| | * | | Fix UnicodeBlockTest.Narayan Kamath2014-05-121-81/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove negative tests for blocks that weren't assigned in Java6 but are currently assigned. Those tests weren't very useful anyway, since this class must serve as a test of our ICU glue and not of the underlying ICU data. Also removes a test for the deprecated SURROGATES_AREA member which we don't support to remain consistent with ICU's treatment of blocks in patterns. bug: 12491302 Change-Id: I9301cab55913df635128fe77f820729c34aa6fe3
* | | | | resolved conflicts for merge of 2b6c9f55 to masterNarayan Kamath2014-05-121-5/+7
|\ \ \ \ \ | |/ / / / | | | | | | | | | | Change-Id: I7bd8df2f8679fe85bb95a371fc9cc564581fa29b
| * | | | resolved conflicts for merge of e111e5a4 to klp-modular-dev-plus-aospNarayan Kamath2014-05-121-5/+7
| |\ \ \ \ | | |/ / / | | | | | | | | | | Change-Id: Iaf9c22378a35a0bd2d9e20c6afeb208c468234ab