Changeset 16472 in josm for trunk/test/unit/org
- Timestamp:
- 2020-05-21T00:29:30+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/TextTagParserTest.java
r15750 r16472 4 4 import static org.junit.Assert.assertEquals; 5 5 6 import java.util.ArrayList; 7 import java.util.Arrays; 6 8 import java.util.Collections; 7 9 import java.util.HashMap; 10 import java.util.List; 8 11 import java.util.Map; 9 12 … … 173 176 assertEquals(expected, TextTagParser.readTagsFromText("name=Main street\nurl=https://example.com/?id=1")); 174 177 } 178 179 /** 180 * Tests that the tags ordering is stable. 181 */ 182 @Test 183 public void testStableOrder() { 184 List<String> expected = Arrays.asList("foo4", "foo3", "foo2", "foo1"); 185 ArrayList<String> actual = new ArrayList<>(TextTagParser.readTagsByRegexp( 186 "foo4=bar4 foo3=bar3 foo2=bar2 foo1=bar1", " ", "(.*?)=(.*?)", true).keySet()); 187 assertEquals(expected, actual); 188 } 175 189 }
Note:
See TracChangeset
for help on using the changeset viewer.