Unify duplicate copies of harmony {Matcher2,Mode,Replace,Split}Test.
Android is carrying near-duplicate copies of these tests introduced in:
1.) luni/: commit fdb2704414a9ed92394ada0d1395e4db86889465
(2008-10-21, "Initial Contribution")
2.) harmony-tests/: commit bfd68b1dd4409f61fbc6800ba61f4605ad57945b
(2013-05-03, "Add the harmony regex tests.")
The initial copies already differed, eg.
This CL integrates differences between the two copies. After this CL,
the files are pairwise identical except:
- they are in different packages
- luni's SplitTest.java is missing the file header
Most of the changes are integrated luni/ -> harmony-tests, keeping
tests that were previously only present in one copy, eg.:
- slightly more verbose test case in ReplaceTest.testSimpleReplace()
- SplitTest.testEmptySplits() (added in commit
51809b9c7995d8b813f68712b096d23179de3af0 )
- Matcher2Test tests added by http://r.android.com/695546
In cases where the "better" version is not clear, an arbitrary judgement
call was made. Examples:
- @SuppressWarnings("nls"): Differed in the original imports.
Might be Eclipse specific, but kept for now.
- minor whitespace changes
- formatting of ReplaceTest
This CL does not touch the following files / differences:
- luni/ has PatternTest but harmony-tests/ has MatcherTest
- luni/ has PatternSyntaxExceptionTest but harmony-tests/ has
PatternErrorTest
Bug: 109727025
Test: Treehugger
Test: Ran CtsLibcoreTestCases at a later CL.
Change-Id: Ib1c1c25c2010c082e119a0b8b21dadf58576e3f7
8 files changed