X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Fovsdb-condition.at;h=d3d7d83c8fa3e5b93f3148f3536ed021e3d84b1b;hb=0ef165ecb57943e17a8ee8270df68ffb8d032e29;hp=3715b6d4211562071acdaea43a2d8f70b9496ec7;hpb=f85f8ebbfac946c19b3c6eb0f4170f579d0a4d25;p=sliver-openvswitch.git diff --git a/tests/ovsdb-condition.at b/tests/ovsdb-condition.at index 3715b6d42..d3d7d83c8 100644 --- a/tests/ovsdb-condition.at +++ b/tests/ovsdb-condition.at @@ -74,7 +74,7 @@ OVSDB_CHECK_POSITIVE([conditions on scalars], AT_SETUP([disallowed conditions on scalars]) AT_KEYWORDS([ovsdb negative condition]) -OVS_CHECK_LCOV([[test-ovsdb parse-conditions \ +AT_CHECK([[test-ovsdb parse-conditions \ '{"columns": {"i": {"type": "integer"}, "r": {"type": "real"}, @@ -149,22 +149,22 @@ OVSDB_CHECK_POSITIVE([conditions on sets], ["uuid", "62315898-64e0-40b9-b26f-ff74225303e6"]]]]]' \ ]], [[[["i","==",["set",[]]]] -[["i","!=",["set",[1]]]] +[["i","!=",1]] [["i","includes",["set",[1,2]]]] [["i","excludes",["set",[1,2,3]]]] [["r","==",["set",[]]]] -[["r","!=",["set",[1.5]]]] +[["r","!=",1.5]] [["r","includes",["set",[1.5,2.5]]]] [["r","excludes",["set",[1.5,2.5,3.5]]]] -[["b","==",["set",[true]]]] -[["b","!=",["set",[false]]]] -[["b","includes",["set",[false]]]] +[["b","==",true]] +[["b","!=",false]] +[["b","includes",false]] [["b","excludes",["set",[false,true]]]] -[["s","==",["set",["a"]]]] +[["s","==","a"]] [["s","!=",["set",["a","b"]]]] -[["s","includes",["set",["c"]]]] +[["s","includes","c"]] [["s","excludes",["set",["c","d"]]]] -[["u","==",["set",[["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]]] +[["u","==",["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]] [["u","==",["set",[["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"],["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]]] [["u","includes",["set",[["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"],["uuid","ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"],["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]]] [["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"]]]]]]], @@ -203,7 +203,8 @@ OVSDB_CHECK_POSITIVE([evaluating conditions on integers], [["i", ">=", 1]], [["i", ">", 1]], [["i", "includes", 1]], - [["i", "excludes", 1]]]' \ + [["i", "excludes", 1]], + [["i", ">", 0], ["i", "<", 2]]]' \ '[{"i": 0}, {"i": 1}, {"i": 2}']]], @@ -214,7 +215,8 @@ condition 3: T-T condition 4: -TT condition 5: --T condition 6: -T- -condition 7: T-T], [condition]) +condition 7: T-T +condition 8: -T-], [condition]) OVSDB_CHECK_POSITIVE([evaluating conditions on reals], [[evaluate-conditions \ @@ -226,7 +228,8 @@ OVSDB_CHECK_POSITIVE([evaluating conditions on reals], [["r", ">=", 5.0]], [["r", ">", 5.0]], [["r", "includes", 5.0]], - [["r", "excludes", 5.0]]]' \ + [["r", "excludes", 5.0]], + [["r", "!=", 0], ["r", "!=", 5.1]]]' \ '[{"r": 0}, {"r": 5.0}, {"r": 5.1}']]], @@ -237,7 +240,8 @@ condition 3: T-T condition 4: -TT condition 5: --T condition 6: -T- -condition 7: T-T], [condition]) +condition 7: T-T +condition 8: -T-], [condition]) OVSDB_CHECK_POSITIVE([evaluating conditions on booleans], [[evaluate-conditions \ @@ -249,7 +253,8 @@ OVSDB_CHECK_POSITIVE([evaluating conditions on booleans], [["b", "==", false]], [["b", "!=", false]], [["b", "includes", false]], - [["b", "excludes", false]]]' \ + [["b", "excludes", false]], + [["b", "==", true], ["b", "==", false]]]' \ '[{"b": true}, {"b": false}']]], [condition 0: T- @@ -259,7 +264,8 @@ condition 3: -T condition 4: -T condition 5: T- condition 6: -T -condition 7: T-], [condition]) +condition 7: T- +condition 8: --], [condition]) OVSDB_CHECK_POSITIVE([evaluating conditions on strings], [[evaluate-conditions \ @@ -271,7 +277,8 @@ OVSDB_CHECK_POSITIVE([evaluating conditions on strings], [["s", "==", "foo"]], [["s", "!=", "foo"]], [["s", "includes", "foo"]], - [["s", "excludes", "foo"]]]' \ + [["s", "excludes", "foo"]], + [["s", "!=", "foo"], ["s", "!=", ""]]]' \ '[{"s": ""}, {"s": "foo"}, {"s": "xxx"}']]], @@ -282,7 +289,8 @@ condition 3: -TT condition 4: -T- condition 5: T-T condition 6: -T- -condition 7: T-T], [condition]) +condition 7: T-T +condition 8: --T], [condition]) OVSDB_CHECK_POSITIVE([evaluating conditions on UUIDs], [[evaluate-conditions \ @@ -294,7 +302,9 @@ OVSDB_CHECK_POSITIVE([evaluating conditions on UUIDs], [["u", "==", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]], [["u", "!=", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]], [["u", "includes", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]], - [["u", "excludes", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]]]' \ + [["u", "excludes", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]], + [["u", "!=", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]], + ["u", "!=", ["uuid", "cb160ed6-92a6-4503-a6aa-a09a09e01f0d"]]]]' \ '[{"u": ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]}, {"u": ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]}, {"u": ["uuid", "00000000-0000-0000-0000-000000000000"]}']]], @@ -305,7 +315,8 @@ condition 3: -TT condition 4: -T- condition 5: T-T condition 6: -T- -condition 7: T-T], [condition]) +condition 7: T-T +condition 8: T-T], [condition]) OVSDB_CHECK_POSITIVE([evaluating conditions on sets], [[evaluate-conditions \ @@ -341,7 +352,9 @@ OVSDB_CHECK_POSITIVE([evaluating conditions on sets], [["i", "excludes", ["set", [2]]]], [["i", "excludes", ["set", [2, 0]]]], [["i", "excludes", ["set", [2, 1]]]], - [["i", "excludes", ["set", [2, 1, 0]]]]]' \ + [["i", "excludes", ["set", [2, 1, 0]]]], + [["i", "includes", ["set", [0]]], + ["i", "includes", ["set", [1]]]]]' \ '[{"i": ["set", []]}, {"i": ["set", [0]]}, {"i": ["set", [1]]}, @@ -382,7 +395,8 @@ condition 27: T---T --- condition 28: TTTT- --- condition 29: T-T-- --- condition 30: TT--- --- -condition 31: T---- ---], [condition]) +condition 31: T---- --- +condition 32: ---T- --T], [condition]) # This is the same as the "set" test except that it adds values, # all of which always match. @@ -423,7 +437,9 @@ OVSDB_CHECK_POSITIVE([evaluating conditions on maps (1)], [["i", "excludes", ["map", [[2, true]]]]], [["i", "excludes", ["map", [[2, true], [0, true]]]]], [["i", "excludes", ["map", [[2, true], [1, false]]]]], - [["i", "excludes", ["map", [[2, true], [1, false], [0, true]]]]]]' \ + [["i", "excludes", ["map", [[2, true], [1, false], [0, true]]]]], + [["i", "includes", ["map", [[0, true]]]], + ["i", "includes", ["map", [[1, false]]]]]]' \ '[{"i": ["map", []]}, {"i": ["map", [[0, true]]]}, {"i": ["map", [[1, false]]]}, @@ -464,7 +480,8 @@ condition 27: T---T --- condition 28: TTTT- --- condition 29: T-T-- --- condition 30: TT--- --- -condition 31: T---- ---], [condition]) +condition 31: T---- --- +condition 32: ---T- --T], [condition]) # This is the same as the "set" test except that it adds values, # and those values don't always match. @@ -505,7 +522,9 @@ OVSDB_CHECK_POSITIVE([evaluating conditions on maps (2)], [["i", "excludes", ["map", [[2, true]]]]], [["i", "excludes", ["map", [[2, true], [0, true]]]]], [["i", "excludes", ["map", [[2, true], [1, false]]]]], - [["i", "excludes", ["map", [[2, true], [1, false], [0, true]]]]]]' \ + [["i", "excludes", ["map", [[2, true], [1, false], [0, true]]]]], + [["i", "includes", ["map", [[0, true]]]], + ["i", "includes", ["map", [[1, false]]]]]]' \ '[{"i": ["map", []]}, {"i": ["map", [[0, true]]]}, {"i": ["map", [[0, false]]]}, @@ -555,4 +574,5 @@ condition 27: T-T-T --TT- --T-- condition 28: TTTTT TT-T- T---- condition 29: T-TTT ---T- ----- condition 30: TTT-T -T-T- T---- -condition 31: T-T-T ---T- -----], [condition]) +condition 31: T-T-T ---T- ----- +condition 32: ----- T---- ---T-], [condition])