Changeset 7141 in josm for trunk/test/performance/org
- Timestamp:
- 2014-05-18T16:38:55+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSPerformanceTest.groovy
r7109 r7141 16 16 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles 17 17 import org.openstreetmap.josm.gui.preferences.SourceEntry 18 import org.openstreetmap.josm.io.Compression 18 19 import org.openstreetmap.josm.io.OsmReader 19 20 … … 39 40 * The data file to be rendered 40 41 */ 41 def static DATA_FILE = " /my/test-data.osm"42 def static DATA_FILE = "data_nodist/neubrandenburg.osm.bz2" 42 43 /* ------------------------ / configuration section ---------------------------- */ 43 44 … … 53 54 if ( !f.isFile() || ! f.exists()) { 54 55 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.")60 56 } 61 57 } … … 79 75 MapCSSStyleSource source = new MapCSSStyleSource( 80 76 new SourceEntry( 81 new File(STYLE_FILE).toURI().toURL().toString(),77 STYLE_FILE, 82 78 "test style", 83 79 "a test style", … … 96 92 def loadData() { 97 93 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); 102 95 Main.main.addLayer(new OsmDataLayer(ds,"test layer",null /* no file */)); 103 96 println "DONE"
Note:
See TracChangeset
for help on using the changeset viewer.