Changeset 10717 in josm for trunk/test/unit
- Timestamp:
- 2016-08-03T15:39:00+02:00 (8 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/io/OsmWriterTest.java
r10638 r10717 32 32 Collections.sort(ids, OsmWriter.byIdComparator); 33 33 34 final long[] longIds = ids.stream().mapToLong( x -> x.getUniqueId()).toArray();34 final long[] longIds = ids.stream().mapToLong(NodeData::getUniqueId).toArray(); 35 35 assertArrayEquals(new long[] { 36 36 -3, -12, -20, -9223372036854775808L, 0, 2, 12, 65, 9223372036854775807L -
trunk/test/unit/org/openstreetmap/josm/tools/MemoryManagerTest.java
r10588 r10717 48 48 assertTrue(testMemory.toString().startsWith("MemoryHandle")); 49 49 50 manager.allocateMemory("test2", 10, () -> new Object());50 manager.allocateMemory("test2", 10, Object::new); 51 51 assertEquals(available - 20, manager.getAvailableMemory()); 52 52 … … 62 62 public void testUseAfterFree() throws NotEnoughMemoryException { 63 63 MemoryManager manager = MemoryManager.getInstance(); 64 MemoryHandle<Object> testMemory = manager.allocateMemory("test", 10, () -> new Object());64 MemoryHandle<Object> testMemory = manager.allocateMemory("test", 10, Object::new); 65 65 testMemory.free(); 66 66 testMemory.get(); … … 74 74 public void testFreeAfterFree() throws NotEnoughMemoryException { 75 75 MemoryManager manager = MemoryManager.getInstance(); 76 MemoryHandle<Object> testMemory = manager.allocateMemory("test", 10, () -> new Object());76 MemoryHandle<Object> testMemory = manager.allocateMemory("test", 10, Object::new); 77 77 testMemory.free(); 78 78 testMemory.free(); … … 136 136 assertTrue(manager.resetState().isEmpty()); 137 137 138 manager.allocateMemory("test", 10, () -> new Object());139 manager.allocateMemory("test2", 10, () -> new Object());138 manager.allocateMemory("test", 10, Object::new); 139 manager.allocateMemory("test2", 10, Object::new); 140 140 assertEquals(2, manager.resetState().size()); 141 141 … … 150 150 public void testResetStateUseAfterFree() throws NotEnoughMemoryException { 151 151 MemoryManager manager = MemoryManager.getInstance(); 152 MemoryHandle<Object> testMemory = manager.allocateMemory("test", 10, () -> new Object());152 MemoryHandle<Object> testMemory = manager.allocateMemory("test", 10, Object::new); 153 153 154 154 assertFalse(manager.resetState().isEmpty());
Note:
See TracChangeset
for help on using the changeset viewer.