Changeset 19120 in josm for trunk/test
- Timestamp:
- 2024-06-20T15:55:07+02:00 (5 months ago)
- Location:
- trunk/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergerTestFT.java
r17275 r19120 3 3 4 4 import java.awt.BorderLayout; 5 import java.util.stream.Collectors;6 import java.util.stream.IntStream;7 5 8 6 import javax.swing.JFrame; … … 24 22 n1.put("key" + i, "value" + i); 25 23 } 26 // Java 11: use String.repeat 27 String note = IntStream.range(0, 50).mapToObj(i -> " A very long text ").collect(Collectors.joining()); 24 String note = " A very long text ".repeat(50); 28 25 n1.put("note", note); 29 26 w1.addNode(new Node(2)); -
trunk/test/unit/org/openstreetmap/josm/data/osm/ChangesetTest.java
r18853 r19120 14 14 import java.util.HashMap; 15 15 import java.util.Map; 16 import java.util.stream.Collectors;17 import java.util.stream.IntStream;18 16 19 17 import org.junit.jupiter.api.Test; … … 57 55 // Add a map with too long values => IllegalArgumentException 58 56 keys = new HashMap<>(); 59 // Java 11: use String.repeat 60 keys.put("test", IntStream.range(0, MAX_CHANGESET_TAG_LENGTH + 1).mapToObj(i -> "x").collect(Collectors.joining())); 57 keys.put("test", "x".repeat(MAX_CHANGESET_TAG_LENGTH + 1)); 61 58 try { 62 59 cs.setKeys(keys);
Note:
See TracChangeset
for help on using the changeset viewer.