File tree Expand file tree Collapse file tree 2 files changed +92
-1
lines changed Expand file tree Collapse file tree 2 files changed +92
-1
lines changed Original file line number Diff line number Diff line change 7676 "False" : false ,
7777 "Number" : 5 ,
7878 "EmptyList" : [],
79- "Zero" : 0
79+ "Zero" : 0 ,
80+ "ZeroFloat" : 0.0
8081 },
8182 "cases" : [
8283 {
198199 {
199200 "expression" : " !!Zero" ,
200201 "result" : true
202+ },
203+ {
204+ "expression" : " Zero || Number" ,
205+ "result" : 0
206+ },
207+ {
208+ "expression" : " ZeroFloat || Number" ,
209+ "result" : 0.0
201210 }
202211 ]
203212 },
Original file line number Diff line number Diff line change 265265 }
266266 ]
267267 },
268+ {
269+ "given" : {"foo" : [
270+ {"key" : true },
271+ {"key" : false },
272+ {"key" : 0 },
273+ {"key" : 0.0 },
274+ {"key" : 1 },
275+ {"key" : 1.0 },
276+ {"key" : [0 ]},
277+ {"key" : null },
278+ {"key" : [1 ]},
279+ {"key" : []},
280+ {"key" : {}},
281+ {"key" : {"a" :2 }}
282+ ]},
283+ "cases" : [
284+ {
285+ "expression" : " foo[?key == `true`]" ,
286+ "result" : [{"key" : true }]
287+ },
288+ {
289+ "expression" : " foo[?key == `false`]" ,
290+ "result" : [{"key" : false }]
291+ },
292+ {
293+ "expression" : " foo[?key]" ,
294+ "result" : [
295+ {"key" : true },
296+ {"key" : 0 },
297+ {"key" : 0.0 },
298+ {"key" : 1 },
299+ {"key" : 1.0 },
300+ {"key" : [0 ]},
301+ {"key" : [1 ]},
302+ {"key" : {"a" : 2 }}
303+ ]
304+ },
305+ {
306+ "expression" : " foo[? !key]" ,
307+ "result" : [
308+ {"key" : false },
309+ {"key" : null },
310+ {"key" : []},
311+ {"key" : {}}
312+ ]
313+ },
314+ {
315+ "expression" : " foo[? !!key]" ,
316+ "result" : [
317+ {"key" : true },
318+ {"key" : 0 },
319+ {"key" : 0.0 },
320+ {"key" : 1 },
321+ {"key" : 1.0 },
322+ {"key" : [0 ]},
323+ {"key" : [1 ]},
324+ {"key" : {"a" : 2 }}
325+ ]
326+ },
327+ {
328+ "expression" : " foo[? `true`]" ,
329+ "result" : [
330+ {"key" : true },
331+ {"key" : false },
332+ {"key" : 0 },
333+ {"key" : 0.0 },
334+ {"key" : 1 },
335+ {"key" : 1.0 },
336+ {"key" : [0 ]},
337+ {"key" : null },
338+ {"key" : [1 ]},
339+ {"key" : []},
340+ {"key" : {}},
341+ {"key" : {"a" :2 }}
342+ ]
343+ },
344+ {
345+ "expression" : " foo[? `false`]" ,
346+ "result" : []
347+ }
348+ ]
349+ },
268350 {
269351 "given" : {"reservations" : [
270352 {"instances" : [
You can’t perform that action at this time.
0 commit comments