Changeset 10199 in josm


Ignore:
Timestamp:
2016-05-13T00:36:37+02:00 (9 years ago)
Author:
Don-vip
Message:

fix unit tests

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java

    r10187 r10199  
    290290    // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
    291291    private static final String[] GENERIC_TLDS = new String[] {
    292         // Taken from Version 2016051100, Last Updated Wed May 11 07:07:01 2016 UTC
     292        // Taken from Version 2016051101, Last Updated Thu May 12 07:07:01 2016 UTC
    293293        "aaa", // aaa American Automobile Association, Inc.
    294294        "aarp", // aarp AARP
     
    510510        "day", // day Charleston Road Registry Inc.
    511511        "dclk", // dclk Charleston Road Registry Inc.
     512        "dds", // dds Minds + Machines Group Limited
    512513        "dealer", // dealer Dealer Dot Com, Inc.
    513514        "deals", // deals Sand Sunset, LLC
     
    815816        "menu", // menu Wedding TLD2, LLC
    816817        "meo", // meo PT Comunicacoes S.A.
     818        "metlife", // metlife MetLife Services and Solutions, LLC
    817819        "miami", // miami Top Level Domain Holdings Limited
    818820        "microsoft", // microsoft Microsoft Corporation
     
    869871        "norton", // norton Symantec Corporation
    870872        "nowruz", // nowruz Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
     873        "nowtv", // nowtv Starbucks (HK) Limited
    871874        "nra", // nra NRA Holdings Company, INC.
    872875        "nrw", // nrw Minds + Machines GmbH
     
    901904        "party", // party Blue Sky Registry Limited
    902905        "passagens", // passagens Travel Reservations SRL
     906        "pccw", // pccw PCCW Enterprises Limited
    903907        "pet", // pet Afilias plc
    904908        "pharmacy", // pharmacy National Association of Boards of Pharmacy
     
    966970        "rexroth", // rexroth Robert Bosch GMBH
    967971        "rich", // rich I-REGISTRY Ltd., Niederlassung Deutschland
     972        "richardli", // richardli Pacific Century Asset Management (HK) Limited
    968973        "ricoh", // ricoh Ricoh Company, Ltd.
    969974        "rio", // rio Empresa Municipal de Informática SA - IPLANRIO
     
    12371242        "xn--fjq720a", // 娱乐 Will Bloom, LLC
    12381243        "xn--flw351e", // 谷歌 Charleston Road Registry Inc.
     1244        "xn--fzys8d69uvgm", // 電訊盈科 PCCW Enterprises Limited
    12391245        "xn--g2xx48c", // 购物 Minds + Machines Group Limited
    12401246        "xn--gckr3f0f", // クラウド Amazon Registry Services, Inc.
  • trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java

    r10045 r10199  
    88import java.util.Map;
    99import java.util.Map.Entry;
     10import java.util.TreeSet;
    1011import java.util.regex.Pattern;
    1112
     
    206207    public String toString() {
    207208        StringBuilder res = new StringBuilder("Cascade{ ");
     209        // List properties in alphabetical order to be deterministic, without changing "prop" to a TreeMap
     210        // (no reason too, not sure about the potential memory/performance impact of such a change)
     211        TreeSet<String> props = new TreeSet<>();
    208212        for (Entry<String, Object> entry : prop.entrySet()) {
    209             res.append(entry.getKey()+':');
     213            StringBuilder sb = new StringBuilder(entry.getKey()+':');
    210214            Object val = entry.getValue();
    211215            if (val instanceof float[]) {
    212                 res.append(Arrays.toString((float[]) val));
     216                sb.append(Arrays.toString((float[]) val));
    213217            } else if (val instanceof Color) {
    214                 res.append(Utils.toString((Color) val));
     218                sb.append(Utils.toString((Color) val));
    215219            } else if (val != null) {
    216                 res.append(val);
    217             }
    218             res.append("; ");
     220                sb.append(val);
     221            }
     222            sb.append("; ");
     223            props.add(sb.toString());
     224        }
     225        for (String s : props) {
     226            res.append(s);
    219227        }
    220228        return res.append('}').toString();
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialogTest.java

    r10198 r10199  
    101101                "Range:|s119.4328566955879-Infinity\n" +
    102102                " default: \n" +
    103                 "Cascade{ symbol-fill-color:#ff0000; symbol-stroke-color:#ff0000; major-z-index:4.95; font-size:8.0; symbol-shape:Keyword{square}; symbol-size:6.0; }\n" +
     103                "Cascade{ font-size:8.0; major-z-index:4.95; symbol-fill-color:#ff0000; symbol-shape:Keyword{square}; symbol-size:6.0; symbol-stroke-color:#ff0000; }\n" +
    104104                "\n" +
    105105                "> skipping \"Potlatch 2\" (not active)\n" +
Note: See TracChangeset for help on using the changeset viewer.