Changeset 8565 in josm for trunk/test/unit


Ignore:
Timestamp:
2015-07-04T18:31:20+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #11650 - performance: avoid creation of Date objects when it is not needed (patch by shinigami, modified slightly)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java

    r8510 r8565  
    317317        their.addPrimitive(n1);
    318318
    319 
    320319        DataSetMerger visitor = new DataSetMerger(my, their);
    321320        visitor.merge();
     
    324323        assertEquals(0, visitor.getConflicts().size());
    325324        assertEquals("value1", n2.get("key1"));
    326         assertTrue(n1.getTimestamp().equals(n2.getTimestamp()));
     325        assertEquals(n1.getRawTimestamp(), n2.getRawTimestamp());
    327326        assertEquals(theirUser, n2.getUser());
    328327        assertSame(n2, n);
     
    351350        their.addPrimitive(n1);
    352351
    353 
    354352        DataSetMerger visitor = new DataSetMerger(my, their);
    355353        visitor.merge();
     
    358356        assertEquals(0, visitor.getConflicts().size());
    359357        assertEquals("value1", n2.get("key1"));
    360         assertTrue(n1.getTimestamp().equals(n2.getTimestamp()));
     358        assertEquals(n1.getRawTimestamp(), n2.getRawTimestamp());
    361359        assertFalse(n2.isIncomplete());
    362360        assertSame(n2, n);
     
    665663        assertEquals("their", merged.getUser().getName());
    666664        assertEquals(1111, merged.getUser().getId());
    667         assertEquals(theirWay.getTimestamp(), merged.getTimestamp());
     665        assertEquals(theirWay.getRawTimestamp(), merged.getRawTimestamp());
    668666        assertSame(merged, myWay);
    669667        assertSame(merged.getNode(0), n1);
     
    719717        assertEquals("their", merged.getUser().getName());
    720718        assertEquals(1111, merged.getUser().getId());
    721         assertEquals(theirWay.getTimestamp(), merged.getTimestamp());
     719        assertEquals(theirWay.getRawTimestamp(), merged.getRawTimestamp());
    722720        assertSame(merged, myWay);
    723721        assertSame(merged.getNode(0), n1);
Note: See TracChangeset for help on using the changeset viewer.