Index: trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactoryTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactoryTest.java	(revision 17760)
+++ trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactoryTest.java	(revision 17762)
@@ -13,4 +13,6 @@
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import net.trajano.commons.testing.UtilityClassTestUtil;
+
+import java.lang.reflect.Method;
 
 /**
@@ -43,3 +45,16 @@
         UtilityClassTestUtil.assertUtilityClassWellDefined(PseudoClasses.class);
     }
+
+    /**
+     * Tests that all functions have been registered to {@link ConditionFactory.PseudoClassCondition#CONDITION_MAP}
+     */
+    @Test
+    void testAllPseudoClassesRegistered() {
+        for (Method method : PseudoClasses.class.getDeclaredMethods()) {
+            String name = method.getName().replaceFirst("^_new$", "new");
+            Context context = name.equals("sameTags") ? Context.LINK : Context.PRIMITIVE;
+            ConditionFactory.PseudoClassCondition.createPseudoClassCondition(name, false, context);
+            ConditionFactory.PseudoClassCondition.createPseudoClassCondition(name, true, context);
+        }
+    }
 }
Index: trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java	(revision 17760)
+++ trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java	(revision 17762)
@@ -89,10 +89,18 @@
     @Test
     void testPseudoClassCondition() throws Exception {
+        Condition c0 = ((Selector.GeneralSelector) getParser("way:area-style").selector()).conds.get(0);
         Condition c1 = ((Selector.GeneralSelector) getParser("way!:area-style").selector()).conds.get(0);
         Condition c2 = ((Selector.GeneralSelector) getParser("way!:areaStyle").selector()).conds.get(0);
         Condition c3 = ((Selector.GeneralSelector) getParser("way!:area_style").selector()).conds.get(0);
+        assertEquals(":areaStyle", c0.toString());
         assertEquals("!:areaStyle", c1.toString());
         assertEquals("!:areaStyle", c2.toString());
         assertEquals("!:areaStyle", c3.toString());
+        Selector tagged = getParser("way:tagged").selector();
+        Selector notTagged = getParser("way!:tagged").selector();
+        assertFalse(tagged.matches((new Environment(OsmUtils.createPrimitive("way")))));
+        assertTrue(tagged.matches((new Environment(OsmUtils.createPrimitive("way building=yes")))));
+        assertTrue(notTagged.matches((new Environment(OsmUtils.createPrimitive("way")))));
+        assertFalse(notTagged.matches((new Environment(OsmUtils.createPrimitive("way building=yes")))));
     }
 
