LocaleDisplayNames not tested well

Description

Some of the tests are in class TestLocaleNamePackaging which is in project icu4j-packaging-tests which appears to not be run normally. I don't see a readme that says why not.

Move the code testing LocaleDisplayNames into the icu4j-core-tests project. (Probably rename it to TestLocaleDisplayNames.)

LastResortLocaleDisplayNames is not tested at all. It is a private class nested in LocaleDisplayNames. Probably easiest to make it a separate public class in the impl package. Then write simple coverage tests. If we wanted to also reach the call sites of its constructors, we would have to do something like check for a special bogus locale ID; in that case, the LastResort... class could stay where it is.

Assignee

Fredrik Roubert

Reporter

Markus Scherer

Components

Labels

Reviewer

Victor Chang

Priority

trivial

Time Needed

Hours

Fix versions

Configure