Changeset 7141 in josm for trunk/test/performance


Ignore:
Timestamp:
2014-05-18T16:38:55+02:00 (6 years ago)
Author:
bastiK
Message:

see #9691 - fix unit test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSPerformanceTest.groovy

    r7109 r7141  
    1616import org.openstreetmap.josm.gui.mappaint.MapPaintStyles
    1717import org.openstreetmap.josm.gui.preferences.SourceEntry
     18import org.openstreetmap.josm.io.Compression
    1819import org.openstreetmap.josm.io.OsmReader
    1920
     
    3940     * The data file to be rendered
    4041     */
    41     def static DATA_FILE = "/my/test-data.osm"
     42    def static DATA_FILE = "data_nodist/neubrandenburg.osm.bz2"
    4243    /* ------------------------ / configuration section  ---------------------------- */
    4344
     
    5354          if ( !f.isFile() || ! f.exists()) {
    5455              fail("STYLE_FILE refers to '${STYLE_FILE}. This is either not a file or doesn't exist.\nPlease update configuration settings in the unit test file.")
    55           }
    56 
    57           f = new File(DATA_FILE);
    58           if ( !f.isFile() || ! f.exists()) {
    59               fail("DATA_FILE refers to '${DATA_FILE}. This is either not a file or doesn't exist.\nPlease update configuration settings in the unit test file.")
    6056          }
    6157    }
     
    7975        MapCSSStyleSource source = new MapCSSStyleSource(
    8076            new SourceEntry(
    81                 new File(STYLE_FILE).toURI().toURL().toString(),
     77                STYLE_FILE,
    8278                "test style",
    8379                "a test style",
     
    9692    def loadData() {
    9793        print "Loading data file '$DATA_FILE' ..."
    98         new File(DATA_FILE).withInputStream {
    99             InputStream is ->
    100             ds = OsmReader.parseDataSet(is,null)
    101         }
     94        ds = OsmReader.parseDataSet(Compression.getUncompressedFileInputStream(new File(DATA_FILE)), null);
    10295        Main.main.addLayer(new OsmDataLayer(ds,"test layer",null /* no file */));
    10396        println "DONE"
Note: See TracChangeset for help on using the changeset viewer.