Changeset 14664 in josm


Ignore:
Timestamp:
2019-01-08T13:13:46+01:00 (11 days ago)
Author:
stoecker
Message:

fix test cases, see #17173

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/LanguageInfoTest.java

    r14647 r14664  
    3232    private static final Locale ZN_CN = Locale.SIMPLIFIED_CHINESE;
    3333    private static final Locale ZN_TW = Locale.TRADITIONAL_CHINESE;
     34    private static final Locale EN_GB = new Locale("en", "GB");
     35    private static final Locale RU = new Locale("ru");
     36    private static final Locale NB = new Locale("nb");
     37    private static final Locale AST = new Locale("ast");
    3438
    3539    /**
     
    3943    public void getWikiLanguagePrefix() {
    4044        testWikiLanguagePrefixes(LanguageInfo.LocaleType.DEFAULT,
    41                 "En:", "De:", "Pt_BR:", "Ca-Valencia:", "Zh_CN:", "Zh_TW:");
     45                "En:", "De:", "Pt_BR:", "Ca-Valencia:", "Zh_CN:", "Zh_TW:", "Ast:", "En_GB:", "Ru:", "Nb:");
    4246        testWikiLanguagePrefixes(LanguageInfo.LocaleType.DEFAULTNOTENGLISH,
    43                 null, "De:", "Pt_BR:", "Ca-Valencia:", "Zh_CN:", "Zh_TW:");
     47                null, "De:", "Pt_BR:", "Ca-Valencia:", "Zh_CN:", "Zh_TW:", "Ast:", "En_GB:", "Ru:", "Nb:");
    4448        testWikiLanguagePrefixes(LanguageInfo.LocaleType.BASELANGUAGE,
    45                 null, null, "Pt:", null, "Zh:", "Zh:");
     49                null, null, "Pt:", null, "Zh:", "Zh:", null, null, null, null);
    4650        testWikiLanguagePrefixes(LanguageInfo.LocaleType.ENGLISH,
    47                 "", "", "", "", "", "");
     51                "", "", "", "", "", "", "", "", "", "");
    4852        testWikiLanguagePrefixes(LanguageInfo.LocaleType.OSM_WIKI,
    49                 "", "de:", "pt:", "ca:", "Zh-hans:", "Zh-hant:");
     53                "", "DE:", "Pt:", "Ca:", "Zh-hans:", "Zh-hant:", "Ast:", "", "RU:", "No:");
    5054    }
    5155
    5256    private static void testWikiLanguagePrefixes(LanguageInfo.LocaleType type, String...expected) {
    53         final List<String> actual = Stream.of(EN_CA, DE_DE, PT_BR, CA_ES_VALENCIA, ZN_CN, ZN_TW)
     57        final List<String> actual = Stream.of(EN_CA, DE_DE, PT_BR, CA_ES_VALENCIA, ZN_CN, ZN_TW, AST, EN_GB, RU, NB)
    5458                .map(locale -> LanguageInfo.getWikiLanguagePrefix(locale, type))
    5559                .collect(Collectors.toList());
Note: See TracChangeset for help on using the changeset viewer.