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]]]' \
217 condition 7: T-T], [condition])
219 OVSDB_CHECK_POSITIVE([evaluating conditions on reals],
220 [[evaluate-conditions \
221 '{"columns": {"r": {"type": "real"}}}' \
228 [["r", "includes", 5.0]],
229 [["r", "excludes", 5.0]]]' \
240 condition 7: T-T], [condition])
242 OVSDB_CHECK_POSITIVE([evaluating conditions on booleans],
243 [[evaluate-conditions \
244 '{"columns": {"b": {"type": "boolean"}}}' \
245 '[[["b", "==", true]],
247 [["b", "includes", true]],
248 [["b", "excludes", true]],
249 [["b", "==", false]],
250 [["b", "!=", false]],
251 [["b", "includes", false]],
252 [["b", "excludes", false]]]' \
262 condition 7: T-], [condition])
264 OVSDB_CHECK_POSITIVE([evaluating conditions on strings],
265 [[evaluate-conditions \
266 '{"columns": {"s": {"type": "string"}}}' \
269 [["s", "includes", ""]],
270 [["s", "excludes", ""]],
271 [["s", "==", "foo"]],
272 [["s", "!=", "foo"]],
273 [["s", "includes", "foo"]],
274 [["s", "excludes", "foo"]]]' \
285 condition 7: T-T], [condition])
287 OVSDB_CHECK_POSITIVE([evaluating conditions on UUIDs],
288 [[evaluate-conditions \
289 '{"columns": {"u": {"type": "uuid"}}}' \
290 '[[["u", "==", ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]]],
291 [["u", "!=", ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]]],
292 [["u", "includes", ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]]],
293 [["u", "excludes", ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]]],
294 [["u", "==", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]],
295 [["u", "!=", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]],
296 [["u", "includes", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]],
297 [["u", "excludes", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]]]' \
298 '[{"u": ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]},
299 {"u": ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]},
300 {"u": ["uuid", "00000000-0000-0000-0000-000000000000"]}']]],
308 condition 7: T-T], [condition])
310 OVSDB_CHECK_POSITIVE([evaluating conditions on sets],
311 [[evaluate-conditions \
312 '{"columns": {"i": {"type": {"key": "integer", "min": 0, "max": "unlimited"}}}}' \
313 '[[["i", "==", ["set", []]]],
314 [["i", "==", ["set", [0]]]],
315 [["i", "==", ["set", [1]]]],
316 [["i", "==", ["set", [0, 1]]]],
317 [["i", "==", ["set", [2]]]],
318 [["i", "==", ["set", [2, 0]]]],
319 [["i", "==", ["set", [2, 1]]]],
320 [["i", "==", ["set", [2, 1, 0]]]],
321 [["i", "!=", ["set", []]]],
322 [["i", "!=", ["set", [0]]]],
323 [["i", "!=", ["set", [1]]]],
324 [["i", "!=", ["set", [0, 1]]]],
325 [["i", "!=", ["set", [2]]]],
326 [["i", "!=", ["set", [2, 0]]]],
327 [["i", "!=", ["set", [2, 1]]]],
328 [["i", "!=", ["set", [2, 1, 0]]]],
329 [["i", "includes", ["set", []]]],
330 [["i", "includes", ["set", [0]]]],
331 [["i", "includes", ["set", [1]]]],
332 [["i", "includes", ["set", [0, 1]]]],
333 [["i", "includes", ["set", [2]]]],
334 [["i", "includes", ["set", [2, 0]]]],
335 [["i", "includes", ["set", [2, 1]]]],
336 [["i", "includes", ["set", [2, 1, 0]]]],
337 [["i", "excludes", ["set", []]]],
338 [["i", "excludes", ["set", [0]]]],
339 [["i", "excludes", ["set", [1]]]],
340 [["i", "excludes", ["set", [0, 1]]]],
341 [["i", "excludes", ["set", [2]]]],
342 [["i", "excludes", ["set", [2, 0]]]],
343 [["i", "excludes", ["set", [2, 1]]]],
344 [["i", "excludes", ["set", [2, 1, 0]]]]]' \
345 '[{"i": ["set", []]},
348 {"i": ["set", [0, 1]]},
350 {"i": ["set", [2, 0]]},
351 {"i": ["set", [2, 1]]},
352 {"i": ["set", [2, 1, 0]]}]']],
354 condition 0: T---- ---
355 condition 1: -T--- ---
356 condition 2: --T-- ---
357 condition 3: ---T- ---
358 condition 4: ----T ---
359 condition 5: ----- T--
360 condition 6: ----- -T-
361 condition 7: ----- --T
362 condition 8: -TTTT TTT
363 condition 9: T-TTT TTT
364 condition 10: TT-TT TTT
365 condition 11: TTT-T TTT
366 condition 12: TTTT- TTT
367 condition 13: TTTTT -TT
368 condition 14: TTTTT T-T
369 condition 15: TTTTT TT-
370 condition 16: TTTTT TTT
371 condition 17: -T-T- T-T
372 condition 18: --TT- -TT
373 condition 19: ---T- --T
374 condition 20: ----T TTT
375 condition 21: ----- T-T
376 condition 22: ----- -TT
377 condition 23: ----- --T
378 condition 24: TTTTT TTT
379 condition 25: T-T-T -T-
380 condition 26: TT--T T--
381 condition 27: T---T ---
382 condition 28: TTTT- ---
383 condition 29: T-T-- ---
384 condition 30: TT--- ---
385 condition 31: T---- ---], [condition])
387 # This is the same as the "set" test except that it adds values,
388 # all of which always match.
389 OVSDB_CHECK_POSITIVE([evaluating conditions on maps (1)],
390 [[evaluate-conditions \
391 '{"columns": {"i": {"type": {"key": "integer",
394 "max": "unlimited"}}}}' \
395 '[[["i", "==", ["map", []]]],
396 [["i", "==", ["map", [[0, true]]]]],
397 [["i", "==", ["map", [[1, false]]]]],
398 [["i", "==", ["map", [[0, true], [1, false]]]]],
399 [["i", "==", ["map", [[2, true]]]]],
400 [["i", "==", ["map", [[2, true], [0, true]]]]],
401 [["i", "==", ["map", [[2, true], [1, false]]]]],
402 [["i", "==", ["map", [[2, true], [1, false], [0, true]]]]],
403 [["i", "!=", ["map", []]]],
404 [["i", "!=", ["map", [[0, true]]]]],
405 [["i", "!=", ["map", [[1, false]]]]],
406 [["i", "!=", ["map", [[0, true], [1, false]]]]],
407 [["i", "!=", ["map", [[2, true]]]]],
408 [["i", "!=", ["map", [[2, true], [0, true]]]]],
409 [["i", "!=", ["map", [[2, true], [1, false]]]]],
410 [["i", "!=", ["map", [[2, true], [1, false], [0, true]]]]],
411 [["i", "includes", ["map", []]]],
412 [["i", "includes", ["map", [[0, true]]]]],
413 [["i", "includes", ["map", [[1, false]]]]],
414 [["i", "includes", ["map", [[0, true], [1, false]]]]],
415 [["i", "includes", ["map", [[2, true]]]]],
416 [["i", "includes", ["map", [[2, true], [0, true]]]]],
417 [["i", "includes", ["map", [[2, true], [1, false]]]]],
418 [["i", "includes", ["map", [[2, true], [1, false], [0, true]]]]],
419 [["i", "excludes", ["map", []]]],
420 [["i", "excludes", ["map", [[0, true]]]]],
421 [["i", "excludes", ["map", [[1, false]]]]],
422 [["i", "excludes", ["map", [[0, true], [1, false]]]]],
423 [["i", "excludes", ["map", [[2, true]]]]],
424 [["i", "excludes", ["map", [[2, true], [0, true]]]]],
425 [["i", "excludes", ["map", [[2, true], [1, false]]]]],
426 [["i", "excludes", ["map", [[2, true], [1, false], [0, true]]]]]]' \
427 '[{"i": ["map", []]},
428 {"i": ["map", [[0, true]]]},
429 {"i": ["map", [[1, false]]]},
430 {"i": ["map", [[0, true], [1, false]]]},
431 {"i": ["map", [[2, true]]]},
432 {"i": ["map", [[2, true], [0, true]]]},
433 {"i": ["map", [[2, true], [1, false]]]},
434 {"i": ["map", [[2, true], [1, false], [0, true]]]}]']],
436 condition 0: T---- ---
437 condition 1: -T--- ---
438 condition 2: --T-- ---
439 condition 3: ---T- ---
440 condition 4: ----T ---
441 condition 5: ----- T--
442 condition 6: ----- -T-
443 condition 7: ----- --T
444 condition 8: -TTTT TTT
445 condition 9: T-TTT TTT
446 condition 10: TT-TT TTT
447 condition 11: TTT-T TTT
448 condition 12: TTTT- TTT
449 condition 13: TTTTT -TT
450 condition 14: TTTTT T-T
451 condition 15: TTTTT TT-
452 condition 16: TTTTT TTT
453 condition 17: -T-T- T-T
454 condition 18: --TT- -TT
455 condition 19: ---T- --T
456 condition 20: ----T TTT
457 condition 21: ----- T-T
458 condition 22: ----- -TT
459 condition 23: ----- --T
460 condition 24: TTTTT TTT
461 condition 25: T-T-T -T-
462 condition 26: TT--T T--
463 condition 27: T---T ---
464 condition 28: TTTT- ---
465 condition 29: T-T-- ---
466 condition 30: TT--- ---
467 condition 31: T---- ---], [condition])
469 # This is the same as the "set" test except that it adds values,
470 # and those values don't always match.
471 OVSDB_CHECK_POSITIVE([evaluating conditions on maps (2)],
472 [[evaluate-conditions \
473 '{"columns": {"i": {"type": {"key": "integer",
476 "max": "unlimited"}}}}' \
477 '[[["i", "==", ["map", []]]],
478 [["i", "==", ["map", [[0, true]]]]],
479 [["i", "==", ["map", [[1, false]]]]],
480 [["i", "==", ["map", [[0, true], [1, false]]]]],
481 [["i", "==", ["map", [[2, true]]]]],
482 [["i", "==", ["map", [[2, true], [0, true]]]]],
483 [["i", "==", ["map", [[2, true], [1, false]]]]],
484 [["i", "==", ["map", [[2, true], [1, false], [0, true]]]]],
485 [["i", "!=", ["map", []]]],
486 [["i", "!=", ["map", [[0, true]]]]],
487 [["i", "!=", ["map", [[1, false]]]]],
488 [["i", "!=", ["map", [[0, true], [1, false]]]]],
489 [["i", "!=", ["map", [[2, true]]]]],
490 [["i", "!=", ["map", [[2, true], [0, true]]]]],
491 [["i", "!=", ["map", [[2, true], [1, false]]]]],
492 [["i", "!=", ["map", [[2, true], [1, false], [0, true]]]]],
493 [["i", "includes", ["map", []]]],
494 [["i", "includes", ["map", [[0, true]]]]],
495 [["i", "includes", ["map", [[1, false]]]]],
496 [["i", "includes", ["map", [[0, true], [1, false]]]]],
497 [["i", "includes", ["map", [[2, true]]]]],
498 [["i", "includes", ["map", [[2, true], [0, true]]]]],
499 [["i", "includes", ["map", [[2, true], [1, false]]]]],
500 [["i", "includes", ["map", [[2, true], [1, false], [0, true]]]]],
501 [["i", "excludes", ["map", []]]],
502 [["i", "excludes", ["map", [[0, true]]]]],
503 [["i", "excludes", ["map", [[1, false]]]]],
504 [["i", "excludes", ["map", [[0, true], [1, false]]]]],
505 [["i", "excludes", ["map", [[2, true]]]]],
506 [["i", "excludes", ["map", [[2, true], [0, true]]]]],
507 [["i", "excludes", ["map", [[2, true], [1, false]]]]],
508 [["i", "excludes", ["map", [[2, true], [1, false], [0, true]]]]]]' \
509 '[{"i": ["map", []]},
510 {"i": ["map", [[0, true]]]},
511 {"i": ["map", [[0, false]]]},
512 {"i": ["map", [[1, false]]]},
513 {"i": ["map", [[1, true]]]},
515 {"i": ["map", [[0, true], [1, false]]]},
516 {"i": ["map", [[0, true], [1, true]]]},
517 {"i": ["map", [[2, true]]]},
518 {"i": ["map", [[2, false]]]},
519 {"i": ["map", [[2, true], [0, true]]]},
521 {"i": ["map", [[2, false], [0, true]]]},
522 {"i": ["map", [[2, true], [1, false]]]},
523 {"i": ["map", [[2, true], [1, true]]]},
524 {"i": ["map", [[2, true], [1, false], [0, true]]]},
525 {"i": ["map", [[2, true], [1, false], [0, false]]]}]']],
527 condition 0: T---- ----- -----
528 condition 1: -T--- ----- -----
529 condition 2: ---T- ----- -----
530 condition 3: ----- T---- -----
531 condition 4: ----- --T-- -----
532 condition 5: ----- ----T -----
533 condition 6: ----- ----- -T---
534 condition 7: ----- ----- ---T-
535 condition 8: -TTTT TTTTT TTTTT
536 condition 9: T-TTT TTTTT TTTTT
537 condition 10: TTT-T TTTTT TTTTT
538 condition 11: TTTTT -TTTT TTTTT
539 condition 12: TTTTT TT-TT TTTTT
540 condition 13: TTTTT TTTT- TTTTT
541 condition 14: TTTTT TTTTT T-TTT
542 condition 15: TTTTT TTTTT TTT-T
543 condition 16: TTTTT TTTTT TTTTT
544 condition 17: -T--- TT--T T--T-
545 condition 18: ---T- T---- -T-TT
546 condition 19: ----- T---- ---T-
547 condition 20: ----- --T-T -TTTT
548 condition 21: ----- ----T ---T-
549 condition 22: ----- ----- -T-TT
550 condition 23: ----- ----- ---T-
551 condition 24: TTTTT TTTTT TTTTT
552 condition 25: T-TTT --TT- -TT-T
553 condition 26: TTT-T -TTTT T-T--
554 condition 27: T-T-T --TT- --T--
555 condition 28: TTTTT TT-T- T----
556 condition 29: T-TTT ---T- -----
557 condition 30: TTT-T -T-T- T----
558 condition 31: T-T-T ---T- -----], [condition])