Changeset 4074 in josm for trunk/test


Ignore:
Timestamp:
2011-05-05T20:49:14+02:00 (9 years ago)
Author:
bastiK
Message:

mapcss: performance improvement for parent selector (by Gubaer)

Location:
trunk/test
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/config/test-unit-env.properties

    r1752 r4074  
    99# This is the home directory for JOSM plugins: ${josm.home}\plugins\*.jar
    1010#
    11 josm.home=C:\\data\\projekte\\osm\\tag-editor-plugin
     11josm.home=C:\\data\\projekte\\osm\\repositories\\josm-github-Gubaer\\test\\config\\unit-josm.home
    1212
  • trunk/test/unit/org/openstreetmap/josm/gui/mappaint/MapCSSWithExtendedTextDirectivesTest.groovy

    r4069 r4074  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.mappaint
    3 
    43import java.awt.Color
    54
     
    87import org.openstreetmap.josm.gui.mappaint.LabelCompositionStrategy.DeriveLabelFromNameTagsCompositionStrategy
    98import org.openstreetmap.josm.gui.mappaint.LabelCompositionStrategy.TagLookupCompositionStrategy
     9import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.TagKeyReference
    1010class MapCSSWithExtendedTextDirectivesTest {
    1111   
     
    2121        c.put("text", new Keyword("auto"))
    2222       
    23         TextElement te = TextElement.create(c, Color.WHITE)
     23        TextElement te = TextElement.create(c, Color.WHITE, false /* no default annotate */)
    2424        assert te.labelCompositionStrategy != null
    2525        assert te.labelCompositionStrategy instanceof DeriveLabelFromNameTagsCompositionStrategy
     
    2929    public void createTextElementComposingTextFromTag() {
    3030        Cascade c = new Cascade()
    31         c.put("text", "my_name")
     31        c.put("text", new TagKeyReference("my_name"))
    3232       
    33         TextElement te = TextElement.create(c, Color.WHITE)
    34         assert te.labelCompositionStrategy != null
    35         assert te.labelCompositionStrategy instanceof TagLookupCompositionStrategy
    36         assert te.labelCompositionStrategy.getDefaultLabelTag() == "my_name"
    37     }
    38    
    39     @Test
    40     public void createTextElementComposingTextFromTag_2() {
    41         Cascade c = new Cascade()
    42         c.put("text", new Keyword("my_name"))
    43        
    44         TextElement te = TextElement.create(c, Color.WHITE)
     33        TextElement te = TextElement.create(c, Color.WHITE, false /* no default annotate */)
    4534        assert te.labelCompositionStrategy != null
    4635        assert te.labelCompositionStrategy instanceof TagLookupCompositionStrategy
     
    5241        Cascade c = new Cascade()
    5342       
    54         TextElement te = TextElement.create(c, Color.WHITE)
     43        TextElement te = TextElement.create(c, Color.WHITE, false /* no default annotate */)
    5544        assert te.labelCompositionStrategy == null
    5645    }
  • trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/KeyConditionTest.groovy

    r4069 r4074  
    101101    }   
    102102}
     103
  • trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/KeyValueConditionTest.groovy

    r4069 r4074  
    9090   
    9191}
     92
  • trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ParsingLinkSelectorTest.groovy

    r4069 r4074  
    5656    }
    5757}
     58
Note: See TracChangeset for help on using the changeset viewer.