@@ -727,6 +727,30 @@ def node(self, data, tags):
727727 # assertMatch:"node x=\"It\\\\'s working\""
728728 err .append ({'class' : 14 , 'subclass' : 1474979323 , 'text' : mapcss .tr ('test #2236 - {0} {1}' , mapcss ._tag_uncapture (capture_tags , '{0.key}' ), mapcss ._tag_uncapture (capture_tags , '{0.value}' ))})
729729
730+ # node[to_int("-3")+to_short("4")*to_long("2")=5]
731+ if True :
732+ match = False
733+ if not match :
734+ capture_tags = {}
735+ try : match = ((mapcss .to_int ('-3' )+ mapcss .to_short ('4' )* mapcss .to_long ('2' ) == 5 ))
736+ except mapcss .RuleAbort : pass
737+ if match :
738+ # throwWarning:"test"
739+ # assertMatch:"node x=y"
740+ err .append ({'class' : 6 , 'subclass' : 560627145 , 'text' : {'en' : 'test' }})
741+
742+ # node[to_float("3.14e1")=31.4][to_double("3.1415e1")=31.415]
743+ if True :
744+ match = False
745+ if not match :
746+ capture_tags = {}
747+ try : match = ((mapcss .to_float ('3.14e1' ) == 31.4 ) and (mapcss .to_double ('3.1415e1' ) == 31.415 ))
748+ except mapcss .RuleAbort : pass
749+ if match :
750+ # throwWarning:"test"
751+ # assertMatch:"node x=y"
752+ err .append ({'class' : 6 , 'subclass' : 931844076 , 'text' : {'en' : 'test' }})
753+
730754 return err
731755
732756 def way (self , data , tags , nds ):
@@ -1468,6 +1492,8 @@ class father:
14681492 self .check_err (n .node (data , {'x' : 'd' }), expected = {'class' : 14 , 'subclass' : 877576641 })
14691493 self .check_not_err (n .node (data , {'x' : 'It\' s working' }), expected = {'class' : 14 , 'subclass' : 1474979323 })
14701494 self .check_err (n .node (data , {'x' : 'It\\ \\ \' s working' }), expected = {'class' : 14 , 'subclass' : 1474979323 })
1495+ self .check_err (n .node (data , {'x' : 'y' }), expected = {'class' : 6 , 'subclass' : 560627145 })
1496+ self .check_err (n .node (data , {'x' : 'y' }), expected = {'class' : 6 , 'subclass' : 931844076 })
14711497 self .check_err (n .way (data , {'x' : 'C00;C1;C22' }, [0 ]), expected = {'class' : 15 , 'subclass' : 1785050832 })
14721498 self .check_err (n .way (data , {'x' : 'C1' }, [0 ]), expected = {'class' : 15 , 'subclass' : 1785050832 })
14731499 self .check_not_err (n .way (data , {'x' : 'C12' }, [0 ]), expected = {'class' : 15 , 'subclass' : 1785050832 })
0 commit comments