Last change
on this file since 14273 was 12994, checked in by bastiK, 7 years ago |
add MapCSSRendererTest case for expression evaluation
|
-
Property svn:eol-style
set to
native
|
File size:
718 bytes
|
Line | |
---|
1 | * {
|
---|
2 | font-size: 20;
|
---|
3 | }
|
---|
4 |
|
---|
5 | node[test] {
|
---|
6 | symbol-shape:square;
|
---|
7 | symbol-size: 20;
|
---|
8 | value: "";
|
---|
9 | result: "";
|
---|
10 | }
|
---|
11 |
|
---|
12 | node[test=1] {
|
---|
13 | value: 2 + 3 * 5 + 1 / 4;
|
---|
14 | result: 17.25;
|
---|
15 | }
|
---|
16 |
|
---|
17 | node[test=2] {
|
---|
18 | tmp: 3;
|
---|
19 | value: cond(tag("12") >= 14, 1, 2) + (10*cond(tag("15") >= 14, 1, 2)) + (100*max(prop("tmp"), 2));
|
---|
20 | result: 312;
|
---|
21 | }
|
---|
22 |
|
---|
23 | node[test=3] {
|
---|
24 | lst: 12, 3, 6;
|
---|
25 | tmp: list(get(prop("lst"), 1), get(prop("lst"), 0), get(prop("lst"), 2), length(prop("lst")));
|
---|
26 | value: concat("", prop("tmp"));
|
---|
27 | result: "[3.0, 12.0, 6.0, 3]";
|
---|
28 | }
|
---|
29 |
|
---|
30 | node[test=4] {
|
---|
31 | value: regexp_test("aa\\|", "aa|");
|
---|
32 | result: "true";
|
---|
33 | }
|
---|
34 |
|
---|
35 | node[test] {
|
---|
36 | text: concat("Test ", tag("test"), ": ", prop(result), " == ", prop(value));
|
---|
37 | }
|
---|
38 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.