1 AT_BANNER([OVSDB -- conditions])
3 OVSDB_CHECK_POSITIVE([null condition],
5 '{"columns": {"name": {"type": "string"}}}' \
9 OVSDB_CHECK_POSITIVE([conditions on scalars],
12 {"i": {"type": "integer"},
13 "r": {"type": "real"},
14 "b": {"type": "boolean"},
15 "s": {"type": "string"},
16 "u": {"type": "uuid"}}}' \
23 '[["i", "includes", 6]]' \
24 '[["i", "excludes", 7]]' \
25 '[["r", "==", 0.5]]' \
26 '[["r", "!=", 1.5]]' \
28 '[["r", "<=", 3.5]]' \
30 '[["r", ">=", 5.5]]' \
31 '[["r", "includes", 6.5]]' \
32 '[["r", "excludes", 7.5]]' \
33 '[["b", "==", true]]' \
34 '[["b", "!=", false]]' \
35 '[["b", "includes", false]]' \
36 '[["b", "excludes", true]]' \
37 '[["s", "==", "a"]]' \
38 '[["s", "!=", "b"]]' \
39 '[["s", "includes", "c"]]' \
40 '[["s", "excludes", "d"]]' \
41 '[["u", "==", ["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]]]' \
42 '[["u", "!=", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]' \
43 '[["u", "includes", ["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]]' \
44 '[["u", "excludes", ["uuid", "62315898-64e0-40b9-b26f-ff74225303e6"]]]']],
59 [["r","includes",6.5]]
60 [["r","excludes",7.5]]
63 [["b","includes",false]]
64 [["b","excludes",true]]
67 [["s","includes","c"]]
68 [["s","excludes","d"]]
69 [["u","==",["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]
70 [["u","!=",["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"]]]
71 [["u","includes",["uuid","ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]]
72 [["u","excludes",["uuid","62315898-64e0-40b9-b26f-ff74225303e6"]]]]],
75 AT_SETUP([disallowed conditions on scalars])
76 AT_KEYWORDS([ovsdb negative condition])
77 AT_CHECK([[test-ovsdb parse-conditions \
79 {"i": {"type": "integer"},
80 "r": {"type": "real"},
81 "b": {"type": "boolean"},
82 "s": {"type": "string"},
83 "u": {"type": "uuid"}}}' \
84 '[["b", ">", true]]' \
85 '[["b", ">=", false]]' \
86 '[["b", "<", false]]' \
87 '[["b", "<=", false]]' \
89 '[["s", ">=", "b"]]' \
91 '[["s", "<=", "d"]]' \
92 '[["u", ">", ["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]]]' \
93 '[["u", ">=", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]' \
94 '[["u", "<", ["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]]' \
95 '[["u", "<=", ["uuid", "62315898-64e0-40b9-b26f-ff74225303e6"]]]']],
97 [[test-ovsdb: syntax "["b",">",true]": syntax error: Type mismatch: ">" operator may not be applied to column b of type boolean.
98 test-ovsdb: syntax "["b",">=",false]": syntax error: Type mismatch: ">=" operator may not be applied to column b of type boolean.
99 test-ovsdb: syntax "["b","<",false]": syntax error: Type mismatch: "<" operator may not be applied to column b of type boolean.
100 test-ovsdb: syntax "["b","<=",false]": syntax error: Type mismatch: "<=" operator may not be applied to column b of type boolean.
101 test-ovsdb: syntax "["s",">","a"]": syntax error: Type mismatch: ">" operator may not be applied to column s of type string.
102 test-ovsdb: syntax "["s",">=","b"]": syntax error: Type mismatch: ">=" operator may not be applied to column s of type string.
103 test-ovsdb: syntax "["s","<","c"]": syntax error: Type mismatch: "<" operator may not be applied to column s of type string.
104 test-ovsdb: syntax "["s","<=","d"]": syntax error: Type mismatch: "<=" operator may not be applied to column s of type string.
105 test-ovsdb: syntax "["u",">",["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]": syntax error: Type mismatch: ">" operator may not be applied to column u of type uuid.
106 test-ovsdb: syntax "["u",">=",["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"]]": syntax error: Type mismatch: ">=" operator may not be applied to column u of type uuid.
107 test-ovsdb: syntax "["u","<",["uuid","ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]": syntax error: Type mismatch: "<" operator may not be applied to column u of type uuid.
108 test-ovsdb: syntax "["u","<=",["uuid","62315898-64e0-40b9-b26f-ff74225303e6"]]": syntax error: Type mismatch: "<=" operator may not be applied to column u of type uuid.
112 OVSDB_CHECK_POSITIVE([conditions on sets],
115 {"i": {"type": {"key": "integer", "min": 0, "max": "unlimited"}},
116 "r": {"type": {"key": "real", "min": 0, "max": "unlimited"}},
117 "b": {"type": {"key": "boolean", "min": 0, "max": "unlimited"}},
118 "s": {"type": {"key": "string", "min": 0, "max": "unlimited"}},
119 "u": {"type": {"key": "uuid", "min": 0, "max": "unlimited"}}}}' \
120 '[["i", "==", ["set", []]]]' \
121 '[["i", "!=", ["set", [1]]]]' \
122 '[["i", "includes", ["set", [1, 2]]]]' \
123 '[["i", "excludes", ["set", [1, 2, 3]]]]' \
124 '[["r", "==", ["set", []]]]' \
125 '[["r", "!=", ["set", [1.5]]]]' \
126 '[["r", "includes", ["set", [1.5, 2.5]]]]' \
127 '[["r", "excludes", ["set", [1.5, 2.5, 3.5]]]]' \
128 '[["b", "==", ["set", [true]]]]' \
129 '[["b", "!=", ["set", [false]]]]' \
130 '[["b", "includes", ["set", [false]]]]' \
131 '[["b", "excludes", ["set", [true, false]]]]' \
132 '[["s", "==", ["set", ["a"]]]]' \
133 '[["s", "!=", ["set", ["a", "b"]]]]' \
134 '[["s", "includes", ["set", ["c"]]]]' \
135 '[["s", "excludes", ["set", ["c", "d"]]]]' \
137 ["set", [["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]]]]]' \
139 ["set", [["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"],
140 ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]]]' \
142 ["set", [["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"],
143 ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"],
144 ["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]]]]' \
146 ["set", [["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"],
147 ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"],
148 ["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"],
149 ["uuid", "62315898-64e0-40b9-b26f-ff74225303e6"]]]]]' \
151 [[[["i","==",["set",[]]]]
153 [["i","includes",["set",[1,2]]]]
154 [["i","excludes",["set",[1,2,3]]]]
155 [["r","==",["set",[]]]]
157 [["r","includes",["set",[1.5,2.5]]]]
158 [["r","excludes",["set",[1.5,2.5,3.5]]]]
161 [["b","includes",false]]
162 [["b","excludes",["set",[false,true]]]]
164 [["s","!=",["set",["a","b"]]]]
165 [["s","includes","c"]]
166 [["s","excludes",["set",["c","d"]]]]
167 [["u","==",["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]
168 [["u","==",["set",[["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"],["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]]]
169 [["u","includes",["set",[["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"],["uuid","ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"],["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]]]
170 [["u","excludes",["set",[["uuid","62315898-64e0-40b9-b26f-ff74225303e6"],["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"],["uuid","ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"],["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]]]]],
173 OVSDB_CHECK_POSITIVE([condition sorting],
175 '{"columns": {"i": {"type": "integer"}}}' \
176 '[["i", "excludes", 7],
179 ["i", "includes", 2],
184 ["_uuid", "==", ["uuid", "d50e85c6-8ae7-4b16-b69e-4395928bd9be"]]]']],
185 [[[["_uuid","==",["uuid","d50e85c6-8ae7-4b16-b69e-4395928bd9be"]],["i","==",1],["i","includes",2],["i","<=",3],["i","<",4],["i",">=",5],["i",">",6],["i","excludes",7],["i","!=",8]]]])
187 OVSDB_CHECK_POSITIVE([evaluating null condition],
188 [[evaluate-conditions \
189 '{"columns": {"i": {"type": "integer"}}}' \
196 OVSDB_CHECK_POSITIVE([evaluating conditions on integers],
197 [[evaluate-conditions \
198 '{"columns": {"i": {"type": "integer"}}}' \
205 [["i", "includes", 1]],
206 [["i", "excludes", 1]],
207 [["i", ">", 0], ["i", "<", 2]]]' \
219 condition 8: -T-], [condition])
221 OVSDB_CHECK_POSITIVE([evaluating conditions on reals],
222 [[evaluate-conditions \
223 '{"columns": {"r": {"type": "real"}}}' \
230 [["r", "includes", 5.0]],
231 [["r", "excludes", 5.0]],
232 [["r", "!=", 0], ["r", "!=", 5.1]]]' \
244 condition 8: -T-], [condition])
246 OVSDB_CHECK_POSITIVE([evaluating conditions on booleans],
247 [[evaluate-conditions \
248 '{"columns": {"b": {"type": "boolean"}}}' \
249 '[[["b", "==", true]],
251 [["b", "includes", true]],
252 [["b", "excludes", true]],
253 [["b", "==", false]],
254 [["b", "!=", false]],
255 [["b", "includes", false]],
256 [["b", "excludes", false]],
257 [["b", "==", true], ["b", "==", false]]]' \
268 condition 8: --], [condition])
270 OVSDB_CHECK_POSITIVE([evaluating conditions on strings],
271 [[evaluate-conditions \
272 '{"columns": {"s": {"type": "string"}}}' \
275 [["s", "includes", ""]],
276 [["s", "excludes", ""]],
277 [["s", "==", "foo"]],
278 [["s", "!=", "foo"]],
279 [["s", "includes", "foo"]],
280 [["s", "excludes", "foo"]],
281 [["s", "!=", "foo"], ["s", "!=", ""]]]' \
293 condition 8: --T], [condition])
295 OVSDB_CHECK_POSITIVE([evaluating conditions on UUIDs],
296 [[evaluate-conditions \
297 '{"columns": {"u": {"type": "uuid"}}}' \
298 '[[["u", "==", ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]]],
299 [["u", "!=", ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]]],
300 [["u", "includes", ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]]],
301 [["u", "excludes", ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]]],
302 [["u", "==", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]],
303 [["u", "!=", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]],
304 [["u", "includes", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]],
305 [["u", "excludes", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]],
306 [["u", "!=", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]],
307 ["u", "!=", ["uuid", "cb160ed6-92a6-4503-a6aa-a09a09e01f0d"]]]]' \
308 '[{"u": ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]},
309 {"u": ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]},
310 {"u": ["uuid", "00000000-0000-0000-0000-000000000000"]}']]],
319 condition 8: T-T], [condition])
321 OVSDB_CHECK_POSITIVE([evaluating conditions on sets],
322 [[evaluate-conditions \
323 '{"columns": {"i": {"type": {"key": "integer", "min": 0, "max": "unlimited"}}}}' \
324 '[[["i", "==", ["set", []]]],
325 [["i", "==", ["set", [0]]]],
326 [["i", "==", ["set", [1]]]],
327 [["i", "==", ["set", [0, 1]]]],
328 [["i", "==", ["set", [2]]]],
329 [["i", "==", ["set", [2, 0]]]],
330 [["i", "==", ["set", [2, 1]]]],
331 [["i", "==", ["set", [2, 1, 0]]]],
332 [["i", "!=", ["set", []]]],
333 [["i", "!=", ["set", [0]]]],
334 [["i", "!=", ["set", [1]]]],
335 [["i", "!=", ["set", [0, 1]]]],
336 [["i", "!=", ["set", [2]]]],
337 [["i", "!=", ["set", [2, 0]]]],
338 [["i", "!=", ["set", [2, 1]]]],
339 [["i", "!=", ["set", [2, 1, 0]]]],
340 [["i", "includes", ["set", []]]],
341 [["i", "includes", ["set", [0]]]],
342 [["i", "includes", ["set", [1]]]],
343 [["i", "includes", ["set", [0, 1]]]],
344 [["i", "includes", ["set", [2]]]],
345 [["i", "includes", ["set", [2, 0]]]],
346 [["i", "includes", ["set", [2, 1]]]],
347 [["i", "includes", ["set", [2, 1, 0]]]],
348 [["i", "excludes", ["set", []]]],
349 [["i", "excludes", ["set", [0]]]],
350 [["i", "excludes", ["set", [1]]]],
351 [["i", "excludes", ["set", [0, 1]]]],
352 [["i", "excludes", ["set", [2]]]],
353 [["i", "excludes", ["set", [2, 0]]]],
354 [["i", "excludes", ["set", [2, 1]]]],
355 [["i", "excludes", ["set", [2, 1, 0]]]],
356 [["i", "includes", ["set", [0]]],
357 ["i", "includes", ["set", [1]]]]]' \
358 '[{"i": ["set", []]},
361 {"i": ["set", [0, 1]]},
363 {"i": ["set", [2, 0]]},
364 {"i": ["set", [2, 1]]},
365 {"i": ["set", [2, 1, 0]]}]']],
367 condition 0: T---- ---
368 condition 1: -T--- ---
369 condition 2: --T-- ---
370 condition 3: ---T- ---
371 condition 4: ----T ---
372 condition 5: ----- T--
373 condition 6: ----- -T-
374 condition 7: ----- --T
375 condition 8: -TTTT TTT
376 condition 9: T-TTT TTT
377 condition 10: TT-TT TTT
378 condition 11: TTT-T TTT
379 condition 12: TTTT- TTT
380 condition 13: TTTTT -TT
381 condition 14: TTTTT T-T
382 condition 15: TTTTT TT-
383 condition 16: TTTTT TTT
384 condition 17: -T-T- T-T
385 condition 18: --TT- -TT
386 condition 19: ---T- --T
387 condition 20: ----T TTT
388 condition 21: ----- T-T
389 condition 22: ----- -TT
390 condition 23: ----- --T
391 condition 24: TTTTT TTT
392 condition 25: T-T-T -T-
393 condition 26: TT--T T--
394 condition 27: T---T ---
395 condition 28: TTTT- ---
396 condition 29: T-T-- ---
397 condition 30: TT--- ---
398 condition 31: T---- ---
399 condition 32: ---T- --T], [condition])
401 # This is the same as the "set" test except that it adds values,
402 # all of which always match.
403 OVSDB_CHECK_POSITIVE([evaluating conditions on maps (1)],
404 [[evaluate-conditions \
405 '{"columns": {"i": {"type": {"key": "integer",
408 "max": "unlimited"}}}}' \
409 '[[["i", "==", ["map", []]]],
410 [["i", "==", ["map", [[0, true]]]]],
411 [["i", "==", ["map", [[1, false]]]]],
412 [["i", "==", ["map", [[0, true], [1, false]]]]],
413 [["i", "==", ["map", [[2, true]]]]],
414 [["i", "==", ["map", [[2, true], [0, true]]]]],
415 [["i", "==", ["map", [[2, true], [1, false]]]]],
416 [["i", "==", ["map", [[2, true], [1, false], [0, true]]]]],
417 [["i", "!=", ["map", []]]],
418 [["i", "!=", ["map", [[0, true]]]]],
419 [["i", "!=", ["map", [[1, false]]]]],
420 [["i", "!=", ["map", [[0, true], [1, false]]]]],
421 [["i", "!=", ["map", [[2, true]]]]],
422 [["i", "!=", ["map", [[2, true], [0, true]]]]],
423 [["i", "!=", ["map", [[2, true], [1, false]]]]],
424 [["i", "!=", ["map", [[2, true], [1, false], [0, true]]]]],
425 [["i", "includes", ["map", []]]],
426 [["i", "includes", ["map", [[0, true]]]]],
427 [["i", "includes", ["map", [[1, false]]]]],
428 [["i", "includes", ["map", [[0, true], [1, false]]]]],
429 [["i", "includes", ["map", [[2, true]]]]],
430 [["i", "includes", ["map", [[2, true], [0, true]]]]],
431 [["i", "includes", ["map", [[2, true], [1, false]]]]],
432 [["i", "includes", ["map", [[2, true], [1, false], [0, true]]]]],
433 [["i", "excludes", ["map", []]]],
434 [["i", "excludes", ["map", [[0, true]]]]],
435 [["i", "excludes", ["map", [[1, false]]]]],
436 [["i", "excludes", ["map", [[0, true], [1, false]]]]],
437 [["i", "excludes", ["map", [[2, true]]]]],
438 [["i", "excludes", ["map", [[2, true], [0, true]]]]],
439 [["i", "excludes", ["map", [[2, true], [1, false]]]]],
440 [["i", "excludes", ["map", [[2, true], [1, false], [0, true]]]]],
441 [["i", "includes", ["map", [[0, true]]]],
442 ["i", "includes", ["map", [[1, false]]]]]]' \
443 '[{"i": ["map", []]},
444 {"i": ["map", [[0, true]]]},
445 {"i": ["map", [[1, false]]]},
446 {"i": ["map", [[0, true], [1, false]]]},
447 {"i": ["map", [[2, true]]]},
448 {"i": ["map", [[2, true], [0, true]]]},
449 {"i": ["map", [[2, true], [1, false]]]},
450 {"i": ["map", [[2, true], [1, false], [0, true]]]}]']],
452 condition 0: T---- ---
453 condition 1: -T--- ---
454 condition 2: --T-- ---
455 condition 3: ---T- ---
456 condition 4: ----T ---
457 condition 5: ----- T--
458 condition 6: ----- -T-
459 condition 7: ----- --T
460 condition 8: -TTTT TTT
461 condition 9: T-TTT TTT
462 condition 10: TT-TT TTT
463 condition 11: TTT-T TTT
464 condition 12: TTTT- TTT
465 condition 13: TTTTT -TT
466 condition 14: TTTTT T-T
467 condition 15: TTTTT TT-
468 condition 16: TTTTT TTT
469 condition 17: -T-T- T-T
470 condition 18: --TT- -TT
471 condition 19: ---T- --T
472 condition 20: ----T TTT
473 condition 21: ----- T-T
474 condition 22: ----- -TT
475 condition 23: ----- --T
476 condition 24: TTTTT TTT
477 condition 25: T-T-T -T-
478 condition 26: TT--T T--
479 condition 27: T---T ---
480 condition 28: TTTT- ---
481 condition 29: T-T-- ---
482 condition 30: TT--- ---
483 condition 31: T---- ---
484 condition 32: ---T- --T], [condition])
486 # This is the same as the "set" test except that it adds values,
487 # and those values don't always match.
488 OVSDB_CHECK_POSITIVE([evaluating conditions on maps (2)],
489 [[evaluate-conditions \
490 '{"columns": {"i": {"type": {"key": "integer",
493 "max": "unlimited"}}}}' \
494 '[[["i", "==", ["map", []]]],
495 [["i", "==", ["map", [[0, true]]]]],
496 [["i", "==", ["map", [[1, false]]]]],
497 [["i", "==", ["map", [[0, true], [1, false]]]]],
498 [["i", "==", ["map", [[2, true]]]]],
499 [["i", "==", ["map", [[2, true], [0, true]]]]],
500 [["i", "==", ["map", [[2, true], [1, false]]]]],
501 [["i", "==", ["map", [[2, true], [1, false], [0, true]]]]],
502 [["i", "!=", ["map", []]]],
503 [["i", "!=", ["map", [[0, true]]]]],
504 [["i", "!=", ["map", [[1, false]]]]],
505 [["i", "!=", ["map", [[0, true], [1, false]]]]],
506 [["i", "!=", ["map", [[2, true]]]]],
507 [["i", "!=", ["map", [[2, true], [0, true]]]]],
508 [["i", "!=", ["map", [[2, true], [1, false]]]]],
509 [["i", "!=", ["map", [[2, true], [1, false], [0, true]]]]],
510 [["i", "includes", ["map", []]]],
511 [["i", "includes", ["map", [[0, true]]]]],
512 [["i", "includes", ["map", [[1, false]]]]],
513 [["i", "includes", ["map", [[0, true], [1, false]]]]],
514 [["i", "includes", ["map", [[2, true]]]]],
515 [["i", "includes", ["map", [[2, true], [0, true]]]]],
516 [["i", "includes", ["map", [[2, true], [1, false]]]]],
517 [["i", "includes", ["map", [[2, true], [1, false], [0, true]]]]],
518 [["i", "excludes", ["map", []]]],
519 [["i", "excludes", ["map", [[0, true]]]]],
520 [["i", "excludes", ["map", [[1, false]]]]],
521 [["i", "excludes", ["map", [[0, true], [1, false]]]]],
522 [["i", "excludes", ["map", [[2, true]]]]],
523 [["i", "excludes", ["map", [[2, true], [0, true]]]]],
524 [["i", "excludes", ["map", [[2, true], [1, false]]]]],
525 [["i", "excludes", ["map", [[2, true], [1, false], [0, true]]]]],
526 [["i", "includes", ["map", [[0, true]]]],
527 ["i", "includes", ["map", [[1, false]]]]]]' \
528 '[{"i": ["map", []]},
529 {"i": ["map", [[0, true]]]},
530 {"i": ["map", [[0, false]]]},
531 {"i": ["map", [[1, false]]]},
532 {"i": ["map", [[1, true]]]},
534 {"i": ["map", [[0, true], [1, false]]]},
535 {"i": ["map", [[0, true], [1, true]]]},
536 {"i": ["map", [[2, true]]]},
537 {"i": ["map", [[2, false]]]},
538 {"i": ["map", [[2, true], [0, true]]]},
540 {"i": ["map", [[2, false], [0, true]]]},
541 {"i": ["map", [[2, true], [1, false]]]},
542 {"i": ["map", [[2, true], [1, true]]]},
543 {"i": ["map", [[2, true], [1, false], [0, true]]]},
544 {"i": ["map", [[2, true], [1, false], [0, false]]]}]']],
546 condition 0: T---- ----- -----
547 condition 1: -T--- ----- -----
548 condition 2: ---T- ----- -----
549 condition 3: ----- T---- -----
550 condition 4: ----- --T-- -----
551 condition 5: ----- ----T -----
552 condition 6: ----- ----- -T---
553 condition 7: ----- ----- ---T-
554 condition 8: -TTTT TTTTT TTTTT
555 condition 9: T-TTT TTTTT TTTTT
556 condition 10: TTT-T TTTTT TTTTT
557 condition 11: TTTTT -TTTT TTTTT
558 condition 12: TTTTT TT-TT TTTTT
559 condition 13: TTTTT TTTT- TTTTT
560 condition 14: TTTTT TTTTT T-TTT
561 condition 15: TTTTT TTTTT TTT-T
562 condition 16: TTTTT TTTTT TTTTT
563 condition 17: -T--- TT--T T--T-
564 condition 18: ---T- T---- -T-TT
565 condition 19: ----- T---- ---T-
566 condition 20: ----- --T-T -TTTT
567 condition 21: ----- ----T ---T-
568 condition 22: ----- ----- -T-TT
569 condition 23: ----- ----- ---T-
570 condition 24: TTTTT TTTTT TTTTT
571 condition 25: T-TTT --TT- -TT-T
572 condition 26: TTT-T -TTTT T-T--
573 condition 27: T-T-T --TT- --T--
574 condition 28: TTTTT TT-T- T----
575 condition 29: T-TTT ---T- -----
576 condition 30: TTT-T -T-T- T----
577 condition 31: T-T-T ---T- -----
578 condition 32: ----- T---- ---T-], [condition])