summaryrefslogtreecommitdiffstats
path: root/harmony-tests/src/test/java
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge "Fix a testcase in InputStreamReaderTest."Narayan Kamath2013-11-271-8/+4
|\ \
| * | Fix a testcase in InputStreamReaderTest.Narayan Kamath2013-11-261-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | Fix path to test resource. bug: 11665359 Change-Id: Id360215499bc20620c096a3f0a4e85970e606c2b
* | | Fix several decoder bugs.Narayan Kamath2013-11-261-9/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | - NativeConverter should report unterminated character sequences to managed code. - CharsetDecoderIcu should report those errors correctly from flush() - InputStreamReader should check the return value of flush() and not ignore it altogether. bug: 11665359 bug: 10729779 Change-Id: Ic678a645a4ef2b3fe70e2c900c0cd393679f1037
* | Merge "Import missing harmony tests for javax.security.auth."Narayan Kamath2013-11-2610-289/+3232
|\ \
| * | Import missing harmony tests for javax.security.auth.Narayan Kamath2013-11-2510-289/+3232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly missing serialization tests. Also - Fix up package names for tests. - Move tests under the right subpackage where applicable. Change-Id: If30995f5b62a1dcc9f0150d2c16e29bb1b65a48c
* | | am 0af9d85d: am 2e8bdf33: Merge "Make PipedWriter#flush throw if the reader ↵Narayan Kamath2013-11-211-9/+6
|\ \ \ | |/ / | | | | | | | | | | | | | | | is closed." * commit '0af9d85d7071ca74b12418595b8c42533007fad5': Make PipedWriter#flush throw if the reader is closed.
| * | Make PipedWriter#flush throw if the reader is closed.Narayan Kamath2013-11-201-9/+6
| | | | | | | | | | | | | | | bug: 11666814 Change-Id: I25dc56f5e50e0cfb14e5781e953115864be612a9
* | | am 7420e424: am 68cf52ad: Merge "Clean up & fix PipedInputStreamTest."Narayan Kamath2013-11-211-62/+40
|\ \ \ | |/ / | | | | | | | | | * commit '7420e4247b897a723c6a04c05e70eebcd556af8d': Clean up & fix PipedInputStreamTest.
| * | Clean up & fix PipedInputStreamTest.Narayan Kamath2013-11-201-62/+40
| | | | | | | | | | | | | | | | | | | | | Add additional documentation where necessary. bug: 11666814 Change-Id: I622d180c89f835e9466c7efe8f6a079c2516b73f
* | | am d121f03c: am a79889ac: Merge "Remove bogus test case in TreeSetTest."Narayan Kamath2013-11-211-8/+0
|\ \ \ | |/ / | | | | | | | | | * commit 'd121f03c3de5a260444740a185c0afb71e5fb423': Remove bogus test case in TreeSetTest.
| * | Merge "Remove bogus test case in TreeSetTest."Narayan Kamath2013-11-181-8/+0
| |\ \
| | * | Remove bogus test case in TreeSetTest.Narayan Kamath2013-11-181-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding a non-comparable key to the set will throw an exception. Change-Id: Ie3474f657c45891671b8fd1e10cea5a75c9179dc
* | | | am 93a3a9cc: am a95d8947: Merge "Fix typos in comments."Narayan Kamath2013-11-211-2/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit '93a3a9ccc64094da3771bfa4795967639ef34307': Fix typos in comments.
| * | | Fix typos in comments.Narayan Kamath2013-11-181-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | Addresses review comments from : https://android-review.googlesource.com/#/c/70041 Change-Id: Idcb799a24f3ea63fa0fc6702f7c7c55f3a1a9b48
* | | am cfeab7b3: am 47f7ed46: Merge "Move tests from tests/api to harmony-tests. ↵Narayan Kamath2013-11-15408-4/+156350
|\ \ \ | |/ / | | | | | | | | | | | | | | | (Take 2)" * commit 'cfeab7b3523347cdfa1ce1f7fffc922f2cc0ab65': Move tests from tests/api to harmony-tests. (Take 2)
| * | Move tests from tests/api to harmony-tests. (Take 2)Narayan Kamath2013-11-15408-4/+156579
|/ / | | | | | | | | | | | | 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-15408-156579/+4
| | | | | | | | | | | | | | | | This reverts commit 81bf28ad31131815d0a36a43a0eca3c29aefdfcd. Breaks build Change-Id: I3f1562921ffe8fdbec36971dd65db398c27c92db
* | Move tests from tests/api to harmony-tests.Narayan Kamath2013-11-15408-4/+156579
| | | | | | | | | | | | | | The vast majority of cleaned up harmony tests are now in harmony-tests/src/test/org/apache/harmony/tests/ Change-Id: I56c2e484ff434b5618cf6751d602ae9f0db96b30
* | Use a consistent package path for harmony tests.Narayan Kamath2013-11-15142-144/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Harmony was never consistent about where they put their tests. There's no reason we have to be the same. Also, there's no need to have separate subtrees for nio, nio_char etc. etc. This change makes all existing apache harmony tests subpackages of "org.apache.harmony.tests" and put them under libcore/harmony-tests. We somehow managed to end up with two vastly different copies of CharsetDecoderTest & CharsetEncoderTest. I've renamed the copies CharsetDecoder2Test & CharsetEncoder2Test to avoid having to go in and resolve the complicated diffs or speculate about the reasons for their divergence. Change-Id: Ic34e69c2faab8893edd54e05eccd7091f4a09abd
* | Fix a varargs warning in MessageFormatTest.Elliott Hughes2013-10-151-2/+2
| | | | | | | | | | | | bdc was right. Change-Id: I89c470d5deb4abcd0f3ecaeeac29da377e70eafb
* | Clean up CharsetDecoder and CharsetEncoder.Elliott Hughes2013-09-136-112/+131
| | | | | | | | | | | | | | This patch also fixes a few bugs, and a few test bugs, and then the bugs exposed by fixing those tests. Change-Id: Id52f8d9d8c812847ed7af36e8f8721c933f819c1
* | Fix a bug in DateFormat, clean up some SimpleDateFormat tests.Elliott Hughes2013-09-091-190/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We failed a couple of tests because of an assumption about the default time zone: junit.framework.AssertionFailedError: Wrong format: " d" expected: 12 result: 11 at java.text.SimpleDateFormatTest.test(SimpleDateFormatTest.java:55) at org.apache.harmony.tests.java.text.SimpleDateFormatTest.test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition(SimpleDateFormatTest.java:347) junit.framework.AssertionFailedError: Wrong result: h input: 12 expected: Thu Jan 01 00:00:00 UTC 1970 result: Thu Jan 01 08:00:00 UTC 1970 at java.text.SimpleDateFormatTest.parse(SimpleDateFormatTest.java:86) at org.apache.harmony.tests.java.text.SimpleDateFormatTest.test_parseLjava_lang_StringLjava_text_ParsePosition(SimpleDateFormatTest.java:546) Cleaning up the tests and merging OldSimpleDateFormatTest into SimpleDateFormatTest accidentally made one of our tests more strict, at which point it failed because we weren't updating the FieldPosition for 'z' or 'Z' when formatting or parsing. So this patch fixes that by mapping the DateFormat.Field to the appropriate int for Calendar. Change-Id: If4b2f2c02d8ccd50d96d77df3b60e1c1d65ae666
* | Clean up useless comments in MatcherTest.Elliott Hughes2013-09-091-69/+16
| | | | | | | | Change-Id: I921a8e1edb1d2aa596325cf03c04196328b3930b
* | More java.text test cleanup/fixes.Elliott Hughes2013-09-042-38/+460
| | | | | | | | | | | | | | | | | | I investigated http://bugs.icu-project.org/trac/ticket/10353 further and decided it's WAI, so we can remove a TODO implying that icu4c was incorrect. Also merge the remaining OldDecimalFormatTest tests, removing duplication. Change-Id: I1941dd1bef3b5eae258960ca8a5fcd2e7de0c926
* | Only use public API for icu4c's FieldPositionIterator.Elliott Hughes2013-09-041-77/+0
| | | | | | | | Change-Id: I247f7c644537b8e9f67f4f27360ce1449fa04300
* | Fix a DecimalFormat crash when formatting the empty string.Elliott Hughes2013-08-301-0/+9
| | | | | | | | | | | | | | | | | | | | We don't even need a general-purpose iterator, and it's never exposed to user code, so we can simplify things quite a bit. The key change though is that a null array is not an error condition --- it just means we didn't actually output anything. Bug: https://code.google.com/p/android/issues/detail?id=59600 Change-Id: I7ec0bab00e15ab5c3a4dbd15e2dc81494f68e82f
* | Fix harmony java.text test failures.Elliott Hughes2013-08-3014-2058/+1908
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were plenty of bad tests here, but there were some real bugs too. * DecimalFormat was only handling RoundingMode.UNNECESSARY for double formatting. * DecimalFormat was not ensuring that it's superclass' fields were being correctly updated. * NumberFormat was throwing NPE for a null object because of an improved detail message, despite being specified to throw IAE. * We weren't mapping NumberFormat.Field instances to the corresponding icu4c UNUM_x_FIELD constant, so we weren't actually setting FieldPosition objects correctly. * SimpleDateFormat was not formatting milliseconds correctly with 'S'. * NativeDecimalFormat wasn't handling JNI NewString OOME correctly. Bug: 2528220 Bug: 3056865 Bug: 3057080 Bug: 3057090 Change-Id: Iac11f902f2e9649e596e7e7b7bc501b13e956fca
* | Add harmony java.text tests.Elliott Hughes2013-08-2731-0/+11201
| | | | | | | | Change-Id: Id8d0acd77d08ff337b4851ae74a48cc002d66cd9
* | Remove bogus @test comments that confuse vogar.Elliott Hughes2013-08-231-9/+0
| | | | | | | | | | | | | | 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
* | Fix java.util.Scanner bugs.Elliott Hughes2013-08-201-1074/+967
| | | | | | | | | | | | | | | | Also improve the documentation for java.util.regex.Matcher and unify the Scanner tests. Bug: 10310707 Bug: https://code.google.com/p/android/issues/detail?id=40555 Change-Id: I97bd8243845aaa31c084c8424eceb41bbcd8ebbd
* | Fix a bunch of Charset tests.Elliott Hughes2013-08-154-1370/+805
| | | | | | | | | | | | | | | | | | | | The isRegistered test is still failing. The problem is that icu4c's convrtrs.txt has names like "windows-1252" that are both the canonical name for one charset and an alias for another legacy charset. I need to work out how to resolve that. Bug: 10210999 Change-Id: If3425321c814622e4f54b2efca95a767bd16c080
* | More Charset test fixes.Elliott Hughes2013-08-131-72/+44
|/ | | | | Bug: 10210999 Change-Id: Ie0686dae1e0b9dc016c1e99af8d9d4e146d73abd
* Fix various Charset tests, clean up the implementation.Elliott Hughes2013-08-079-145/+62
| | | | | | Bug: 10211558 Bug: 10211378 Change-Id: Ib3f97430f62163c0459c53e0c282ae0ca840e0af
* Fix GB-18030 tests.Elliott Hughes2013-08-062-15/+9
| | | | | Bug: 10211040 Change-Id: Icbfa37b930d475e47e86cd6168c303afe9351295
* We never supported obsolete EBCDIC variants.Elliott Hughes2013-08-061-30/+0
| | | | | | | And we're unlikely to start. So lose the failing test. Bug: 10211032 Change-Id: I36df7f5507b20a301b97ba2e9c2a3250c7de442f
* If libcore wants ASCII casing, it needs to ask for it like everyone else.Elliott Hughes2013-08-021-1/+2
| | | | | | | http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html Bug: https://code.google.com/p/android/issues/detail?id=58359 Change-Id: I597b2ac940f17b5b2bc176e390dc4b63fe0a4e72
* Fix PatternTest failures.Elliott Hughes2013-08-011-1647/+0
| | | | | Bug: 10127357 Change-Id: I202e77d0ea0c8b407aca364ad81c8ae1f9c617ad
* Fix PatternSyntaxExceptionTest.Elliott Hughes2013-08-011-113/+0
| | | | | | | | The now-deleted copy had the serialization test code, but the other copy had the serialization test data. Fixed by merging. Bug: 10127357 Change-Id: Ie3b81b6cd00621965ab2a6a94dc3566df9751649
* Fix a CharsetEncoder test.Elliott Hughes2013-08-011-8/+21
| | | | | Bug: 10127357 Change-Id: I223fe74ed924ebb6cda22301c35bf42518532d74
* Minor cleanup from investigating UnixSelectorTest failures.Elliott Hughes2013-08-011-20/+6
| | | | | | | | This doesn't address the failures, but I'm moving on to look at the other failures first. Bug: 10127357 Change-Id: I6382e843bcb0d3e4b8726500beba2b5e123e9e01
* Fix a Selector bug and a test bug.Elliott Hughes2013-08-011-23/+17
| | | | | Bug: 10127357 Change-Id: I6d80586b243d6bd45fda5a36c043600d7528e891
* Improve Scanner performance.Elliott Hughes2013-06-272-0/+5817
| | | | | | | | | | | | | | | | We really don't want to compute a new regular expression and compile it into a new Pattern every time we call nextInt (and friends). Adding a single-element cache (flushed if the Scanner's locale changes) makes this 100x faster. There still exists a pathological case where you switch back and forth between bases. Also improve the documentation to make it clearer that you really don't want to use this awful class anyway. Also bring back a few more of the tests we lost in the gingerbread timeframe. Bug: https://code.google.com/p/android/issues/detail?id=57050 Change-Id: Id6095682fb44abae2887dda29dd3d32ac777c68f
* Fix SelectorTest#test_selectJ_Empty_Keys flakiness.Elliott Hughes2013-06-261-12/+14
| | | | Change-Id: I4acecd936075f226ae867d8b361ff422978af7de
* Various regex test fixes.Elliott Hughes2013-05-034-203/+120
| | | | | | | Mostly test changes and some duplication removal, but I did turn up a couple of small bugs. Change-Id: I46f99cdf0cdb8a67d358c0acc03079360fe5c333
* Add the harmony regex tests.Elliott Hughes2013-05-039-0/+4585
| | | | Change-Id: Ia98563f4485ee13210f7fb02a08806e2ffd553e0
* Add harmony java.nio.charset tests.Elliott Hughes2013-05-0337-0/+7009
| | | | Change-Id: I713069b35865cc01f5ed2f384dbc50b39d8a9346
* Add the harmony BufferedReaderTest.Elliott Hughes2013-05-011-0/+592
| | | | | Bug: 8778372 Change-Id: I10145bdfd90320da7d3ecd08404c4625495cec32
* Fix various of the harmony nio tests.Elliott Hughes2013-04-263-22/+42
| | | | | | | Plus one real bug, in FileChannelImpl. The expectation I've removed was for a test that doesn't seem to exist in either our tests or the harmony tests. Change-Id: I1ea99042f3f8897f07ba8b4ad8e9a15f30ace79b
* Add the harmony nio tests.Elliott Hughes2013-04-26102-0/+23248
| | | | Change-Id: I8a6d167743b20f31e769fe57d3aba89e16de24c3
* Add the harmony annotation tests.Elliott Hughes2013-04-265-0/+285
| | | | Change-Id: Ibbca52bae20e24e2d76d038d85e1ff5411ffc523