Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: lib/src/prism/tests/languages/twig/operator_feature.test

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 {% set a = 4 %}
2 {{ a == 4 }}
3 {{ b != c }}
4 {{ c < d }}
5 {{ d <= e }}
6 {{ e > f }}
7 {{ f >= g }}
8 {{ g + h }}
9 {{ h - i }}
10 {{ i ~ j }}
11 {{ j * k }}
12 {{ k ** l }}
13 {{ l / m }}
14 {{ m // n }}
15 {{ n % o }}
16 {{ o|default('foo') }}
17 {{ p ? q : r }}
18 {{ s ?: t }}
19
20 {% if a and b or not c %}
21 {% for p in foo %}
22 {% if d b-and e and f b-xor g or h b-or i %}
23 {% if j starts with 'h' %}
24 {% if i ends with 'j' %}
25 {% if k is same as false %}
26 {% if l matches '/f[o]{2,}(?:bar)?' %}
27
28 ----------------------------------------------------
29
30 [
31 ["tag", [
32 ["ld", [["punctuation", "{%"], ["keyword", "set"]]],
33 ["property", "a"], ["operator", "="], ["number", "4"],
34 ["rd", [["punctuation", "%}"]]]
35 ]],
36 ["tag", [
37 ["ld", [["punctuation", "{{"]]],
38 ["property", "a"], ["operator", "=="], ["number", "4"],
39 ["rd", [["punctuation", "}}"]]]
40 ]],
41 ["tag", [
42 ["ld", [["punctuation", "{{"]]],
43 ["property", "b"], ["operator", "!="], ["property", "c"],
44 ["rd", [["punctuation", "}}"]]]
45 ]],
46 ["tag", [
47 ["ld", [["punctuation", "{{"]]],
48 ["property", "c"], ["operator", "<"], ["property", "d"],
49 ["rd", [["punctuation", "}}"]]]
50 ]],
51 ["tag", [
52 ["ld", [["punctuation", "{{"]]],
53 ["property", "d"], ["operator", "<="], ["property", "e"],
54 ["rd", [["punctuation", "}}"]]]
55 ]],
56 ["tag", [
57 ["ld", [["punctuation", "{{"]]],
58 ["property", "e"], ["operator", ">"], ["property", "f"],
59 ["rd", [["punctuation", "}}"]]]
60 ]],
61 ["tag", [
62 ["ld", [["punctuation", "{{"]]],
63 ["property", "f"], ["operator", ">="], ["property", "g"],
64 ["rd", [["punctuation", "}}"]]]
65 ]],
66 ["tag", [
67 ["ld", [["punctuation", "{{"]]],
68 ["property", "g"], ["operator", "+"], ["property", "h"],
69 ["rd", [["punctuation", "}}"]]]
70 ]],
71 ["tag", [
72 ["ld", [["punctuation", "{{"]]],
73 ["property", "h"], ["operator", "-"], ["property", "i"],
74 ["rd", [["punctuation", "}}"]]]
75 ]],
76 ["tag", [
77 ["ld", [["punctuation", "{{"]]],
78 ["property", "i"], ["operator", "~"], ["property", "j"],
79 ["rd", [["punctuation", "}}"]]]
80 ]],
81 ["tag", [
82 ["ld", [["punctuation", "{{"]]],
83 ["property", "j"], ["operator", "*"], ["property", "k"],
84 ["rd", [["punctuation", "}}"]]]
85 ]],
86 ["tag", [
87 ["ld", [["punctuation", "{{"]]],
88 ["property", "k"], ["operator", "**"], ["property", "l"],
89 ["rd", [["punctuation", "}}"]]]
90 ]],
91 ["tag", [
92 ["ld", [["punctuation", "{{"]]],
93 ["property", "l"], ["operator", "/"], ["property", "m"],
94 ["rd", [["punctuation", "}}"]]]
95 ]],
96 ["tag", [
97 ["ld", [["punctuation", "{{"]]],
98 ["property", "m"], ["operator", "//"], ["property", "n"],
99 ["rd", [["punctuation", "}}"]]]
100 ]],
101 ["tag", [
102 ["ld", [["punctuation", "{{"]]],
103 ["property", "n"], ["operator", "%"], ["property", "o"],
104 ["rd", [["punctuation", "}}"]]]
105 ]],
106 ["tag", [
107 ["ld", [["punctuation", "{{"]]],
108 ["property", "o"],
109 ["operator", "|"],
110 ["property", "default"],
111 ["punctuation", "("],
112 ["string", [["punctuation", "'"], "foo", ["punctuation", "'"]]],
113 ["punctuation", ")"],
114 ["rd", [["punctuation", "}}"]]]
115 ]],
116 ["tag", [
117 ["ld", [["punctuation", "{{"]]],
118 ["property", "p"], ["operator", "?"],
119 ["property", "q"], ["punctuation", ":"],
120 ["property", "r"],
121 ["rd", [["punctuation", "}}"]]]
122 ]],
123 ["tag", [
124 ["ld", [["punctuation", "{{"]]],
125 ["property", "s"], ["operator", "?:"], ["property", "t"],
126 ["rd", [["punctuation", "}}"]]]
127 ]],
128 ["tag", [
129 ["ld", [["punctuation", "{%"], ["keyword", "if"]]],
130 ["property", "a"], ["operator", "and"], ["property", "b"],
131 ["operator", "or"], ["operator", "not"], ["property", "c"],
132 ["rd", [["punctuation", "%}"]]]
133 ]],
134 ["tag", [
135 ["ld", [["punctuation", "{%"], ["keyword", "for"]]],
136 ["property", "p"], ["operator", "in"], ["property", "foo"],
137 ["rd", [["punctuation", "%}"]]]
138 ]],
139 ["tag", [
140 ["ld", [["punctuation", "{%"], ["keyword", "if"]]],
141 ["property", "d"], ["operator", "b-and"],
142 ["property", "e"], ["operator", "and"],
143 ["property", "f"], ["operator", "b-xor"],
144 ["property", "g"], ["operator", "or"],
145 ["property", "h"], ["operator", "b-or"],
146 ["property", "i"],
147 ["rd", [["punctuation", "%}"]]]
148 ]],
149 ["tag", [
150 ["ld", [["punctuation", "{%"], ["keyword", "if"]]],
151 ["property", "j"],
152 ["operator", "starts with"],
153 ["string", [["punctuation", "'"], "h", ["punctuation", "'"]]],
154 ["rd", [["punctuation", "%}"]]]
155 ]],
156 ["tag", [
157 ["ld", [["punctuation", "{%"], ["keyword", "if"]]],
158 ["property", "i"],
159 ["operator", "ends with"],
160 ["string", [["punctuation", "'"], "j", ["punctuation", "'"]]],
161 ["rd", [["punctuation", "%}"]]]
162 ]],
163 ["tag", [
164 ["ld", [["punctuation", "{%"], ["keyword", "if"]]],
165 ["property", "k"], ["operator", "is"],
166 ["operator", "same as"], ["boolean", "false"],
167 ["rd", [["punctuation", "%}"]]]
168 ]],
169 ["tag", [
170 ["ld", [["punctuation", "{%"], ["keyword", "if"]]],
171 ["property", "l"], ["operator", "matches"],
172 ["string", [["punctuation", "'"], "/f[o]{2,}(?:bar)?", ["punctua tion", "'"]]],
173 ["rd", [["punctuation", "%}"]]]
174 ]]
175 ]
176
177 ----------------------------------------------------
178
179 Checks for operators.
OLDNEW
« no previous file with comments | « lib/src/prism/tests/languages/twig/number_feature.test ('k') | lib/src/prism/tests/languages/twig/string_feature.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698