Changeset 6881 in josm for trunk/test/unit/org/openstreetmap/josm/tools
- Timestamp:
- 2014-02-24T17:49:12+01:00 (11 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/TextTagParserTest.java
r6471 r6881 10 10 import org.junit.Test; 11 11 import org.openstreetmap.josm.Main; 12 import org.openstreetmap.josm.data.Preferences;13 12 14 13 public class TextTagParserTest { 14 15 /** 16 * Setup test. 17 */ 15 18 @BeforeClass 16 public static void before() {19 public static void setUp() { 17 20 Main.initApplicationPreferences(); 18 21 } … … 26 29 s = "\"2 \\\"3\\\" 4\""; s1 = "2 \"3\" 4"; 27 30 Assert.assertEquals(s1, TextTagParser.unescape(s)); 28 31 29 32 s = "\"2 3 ===4===\""; s1 = "2 3 ===4==="; 30 33 Assert.assertEquals(s1, TextTagParser.unescape(s)); … … 33 36 Assert.assertEquals(s1, TextTagParser.unescape(s)); 34 37 } 35 38 36 39 @Test 37 40 public void testTNformat() { … … 63 66 tags = TextTagParser.readTagsFromText(txt); 64 67 Assert.assertEquals(correctTags, tags); 65 68 66 69 txt = "\"a\" : \"1 1 1\", \"b2\" :\"2 \\\"3 qwe\\\" 4\""; 67 70 correctTags= new HashMap<String, String>() { { put("a", "1 1 1"); put("b2", "2 \"3 qwe\" 4");}}; 68 71 tags = TextTagParser.readTagsFromText(txt); 69 72 Assert.assertEquals(correctTags, tags); 70 73 71 74 txt = " \"aыыы\" : \"val\\\"\\\"\\\"ue1\""; 72 75 correctTags= new HashMap<String, String>() { { put("aыыы", "val\"\"\"ue1");} }; … … 74 77 Assert.assertEquals(correctTags, tags); 75 78 } 76 79 77 80 @Test 78 81 public void testFreeformat() { … … 84 87 Assert.assertEquals(correctTags, tags); 85 88 } 86 89 87 90 @Test 88 91 public void errorDetect() { … … 90 93 Map<String, String> tags = TextTagParser.readTagsFromText(txt); 91 94 Assert.assertEquals(Collections.EMPTY_MAP, tags); 92 95 93 96 } 94 97 } -
trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEngineTest.java
r6471 r6881 19 19 public class TemplateEngineTest { 20 20 21 /** 22 * Setup test. 23 */ 21 24 @BeforeClass 22 public static void before() {25 public static void setUp() { 23 26 Main.initApplicationPreferences(); 24 27 }
Note:
See TracChangeset
for help on using the changeset viewer.