projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ofproto: Generalize facet_put__() so that it is more useful.
[openvswitch]
/
tests
/
ovsdb-types.at
diff --git
a/tests/ovsdb-types.at
b/tests/ovsdb-types.at
index 7122e9d2dbac133c612d1a500348aae4f49e17e7..7bba84601d403b1e328db1a11bc75f7782e5aa79 100644
(file)
--- a/
tests/ovsdb-types.at
+++ b/
tests/ovsdb-types.at
@@
-1,167
+1,167
@@
AT_BANNER([OVSDB -- atomic types])
AT_BANNER([OVSDB -- atomic types])
-OVSDB_CHECK_POSITIVE([integer],
+OVSDB_CHECK_POSITIVE
_CPY
([integer],
[[parse-atomic-type '["integer"]' ]], ["integer"])
[[parse-atomic-type '["integer"]' ]], ["integer"])
-OVSDB_CHECK_POSITIVE([real],
+OVSDB_CHECK_POSITIVE
_CPY
([real],
[[parse-atomic-type '["real"]' ]], ["real"])
[[parse-atomic-type '["real"]' ]], ["real"])
-OVSDB_CHECK_POSITIVE([boolean],
+OVSDB_CHECK_POSITIVE
_CPY
([boolean],
[[parse-atomic-type '["boolean"]' ]], ["boolean"])
[[parse-atomic-type '["boolean"]' ]], ["boolean"])
-OVSDB_CHECK_POSITIVE([string],
+OVSDB_CHECK_POSITIVE
_CPY
([string],
[[parse-atomic-type '["string"]' ]], ["string"])
[[parse-atomic-type '["string"]' ]], ["string"])
-OVSDB_CHECK_POSITIVE([uuid],
+OVSDB_CHECK_POSITIVE
_CPY
([uuid],
[[parse-atomic-type '["uuid"]' ]], ["uuid"])
[[parse-atomic-type '["uuid"]' ]], ["uuid"])
-OVSDB_CHECK_NEGATIVE([void is not a valid atomic-type],
+OVSDB_CHECK_NEGATIVE
_CPY
([void is not a valid atomic-type],
[[parse-atomic-type '["void"]' ]], ["void" is not an atomic-type])
AT_BANNER([OVSDB -- base types])
[[parse-atomic-type '["void"]' ]], ["void" is not an atomic-type])
AT_BANNER([OVSDB -- base types])
-OVSDB_CHECK_POSITIVE([integer enum],
+OVSDB_CHECK_POSITIVE
_CPY
([integer enum],
[[parse-base-type '{"type": "integer", "enum": ["set", [-1, 4, 5]]}' ]],
[[{"enum":["set",[-1,4,5]],"type":"integer"}]])
[[parse-base-type '{"type": "integer", "enum": ["set", [-1, 4, 5]]}' ]],
[[{"enum":["set",[-1,4,5]],"type":"integer"}]])
-OVSDB_CHECK_POSITIVE([integer >= 5],
+OVSDB_CHECK_POSITIVE
_CPY
([integer >= 5],
[[parse-base-type '{"type": "integer", "minInteger": 5}' ]],
[{"minInteger":5,"type":"integer"}])
[[parse-base-type '{"type": "integer", "minInteger": 5}' ]],
[{"minInteger":5,"type":"integer"}])
-OVSDB_CHECK_POSITIVE([integer <= 7],
+OVSDB_CHECK_POSITIVE
_CPY
([integer <= 7],
[[parse-base-type '{"type": "integer", "maxInteger": 7}' ]],
[{"maxInteger":7,"type":"integer"}])
[[parse-base-type '{"type": "integer", "maxInteger": 7}' ]],
[{"maxInteger":7,"type":"integer"}])
-OVSDB_CHECK_POSITIVE([integer between -5 and 10],
+OVSDB_CHECK_POSITIVE
_CPY
([integer between -5 and 10],
[[parse-base-type '{"type": "integer", "minInteger": -5, "maxInteger": 10}']],
[{"maxInteger":10,"minInteger":-5,"type":"integer"}])
[[parse-base-type '{"type": "integer", "minInteger": -5, "maxInteger": 10}']],
[{"maxInteger":10,"minInteger":-5,"type":"integer"}])
-OVSDB_CHECK_NEGATIVE([integer max may not be less than min],
+OVSDB_CHECK_NEGATIVE
_CPY
([integer max may not be less than min],
[[parse-base-type '{"type": "integer", "minInteger": 5, "maxInteger": 3}']],
[minInteger exceeds maxInteger])
[[parse-base-type '{"type": "integer", "minInteger": 5, "maxInteger": 3}']],
[minInteger exceeds maxInteger])
-OVSDB_CHECK_POSITIVE([real enum],
+OVSDB_CHECK_POSITIVE
_CPY
([real enum],
[[parse-base-type '{"type": "real", "enum": ["set", [1.5, 0, 2.75]]}' ]],
[[{"enum":["set",[0,1.5,2.75]],"type":"real"}]])
[[parse-base-type '{"type": "real", "enum": ["set", [1.5, 0, 2.75]]}' ]],
[[{"enum":["set",[0,1.5,2.75]],"type":"real"}]])
-OVSDB_CHECK_POSITIVE([real >= -1.5],
+OVSDB_CHECK_POSITIVE
_CPY
([real >= -1.5],
[[parse-base-type '{"type": "real", "minReal": -1.5}']],
[{"minReal":-1.5,"type":"real"}])
[[parse-base-type '{"type": "real", "minReal": -1.5}']],
[{"minReal":-1.5,"type":"real"}])
-OVSDB_CHECK_POSITIVE([real <= 1e5],
+OVSDB_CHECK_POSITIVE
_CPY
([real <= 1e5],
[[parse-base-type '{"type": "real", "maxReal": 1e5}']],
[{"maxReal":100000,"type":"real"}])
[[parse-base-type '{"type": "real", "maxReal": 1e5}']],
[{"maxReal":100000,"type":"real"}])
-OVSDB_CHECK_POSITIVE([real between -2.5 and 3.75],
+OVSDB_CHECK_POSITIVE
_CPY
([real between -2.5 and 3.75],
[[parse-base-type '{"type": "real", "minReal": -2.5, "maxReal": 3.75}']],
[{"maxReal":3.75,"minReal":-2.5,"type":"real"}])
[[parse-base-type '{"type": "real", "minReal": -2.5, "maxReal": 3.75}']],
[{"maxReal":3.75,"minReal":-2.5,"type":"real"}])
-OVSDB_CHECK_NEGATIVE([real max may not be less than min],
+OVSDB_CHECK_NEGATIVE
_CPY
([real max may not be less than min],
[[parse-base-type '{"type": "real", "minReal": 555, "maxReal": 444}']],
[minReal exceeds maxReal])
[[parse-base-type '{"type": "real", "minReal": 555, "maxReal": 444}']],
[minReal exceeds maxReal])
-OVSDB_CHECK_POSITIVE([boolean],
+OVSDB_CHECK_POSITIVE
_CPY
([boolean],
[[parse-base-type '[{"type": "boolean"}]' ]], ["boolean"])
[[parse-base-type '[{"type": "boolean"}]' ]], ["boolean"])
-OVSDB_CHECK_POSITIVE([boolean enum],
+OVSDB_CHECK_POSITIVE
_CPY
([boolean enum],
[[parse-base-type '{"type": "boolean", "enum": true}' ]],
[[{"enum":true,"type":"boolean"}]])
[[parse-base-type '{"type": "boolean", "enum": true}' ]],
[[{"enum":true,"type":"boolean"}]])
-OVSDB_CHECK_POSITIVE([string enum],
+OVSDB_CHECK_POSITIVE
_CPY
([string enum],
[[parse-base-type '{"type": "string", "enum": ["set", ["def", "abc"]]}']],
[[{"enum":["set",["abc","def"]],"type":"string"}]])
[[parse-base-type '{"type": "string", "enum": ["set", ["def", "abc"]]}']],
[[{"enum":["set",["abc","def"]],"type":"string"}]])
-OVSDB_CHECK_POSITIVE([string minLength],
+OVSDB_CHECK_POSITIVE
_CPY
([string minLength],
[[parse-base-type '{"type": "string", "minLength": 1}']],
[{"minLength":1,"type":"string"}])
[[parse-base-type '{"type": "string", "minLength": 1}']],
[{"minLength":1,"type":"string"}])
-OVSDB_CHECK_POSITIVE([string maxLength],
+OVSDB_CHECK_POSITIVE
_CPY
([string maxLength],
[[parse-base-type '{"type": "string", "maxLength": 5}']],
[{"maxLength":5,"type":"string"}])
[[parse-base-type '{"type": "string", "maxLength": 5}']],
[{"maxLength":5,"type":"string"}])
-OVSDB_CHECK_POSITIVE([string minLength and maxLength],
+OVSDB_CHECK_POSITIVE
_CPY
([string minLength and maxLength],
[[parse-base-type '{"type": "string", "minLength": 1, "maxLength": 5}']],
[{"maxLength":5,"minLength":1,"type":"string"}])
[[parse-base-type '{"type": "string", "minLength": 1, "maxLength": 5}']],
[{"maxLength":5,"minLength":1,"type":"string"}])
-OVSDB_CHECK_NEGATIVE([maxLength must not be less than minLength],
+OVSDB_CHECK_NEGATIVE
_CPY
([maxLength must not be less than minLength],
[[parse-base-type '{"type": "string", "minLength": 5, "maxLength": 3}']],
[minLength exceeds maxLength])
[[parse-base-type '{"type": "string", "minLength": 5, "maxLength": 3}']],
[minLength exceeds maxLength])
-OVSDB_CHECK_NEGATIVE([maxLength must not be negative],
+OVSDB_CHECK_NEGATIVE
_CPY
([maxLength must not be negative],
[[parse-base-type '{"type": "string", "maxLength": -1}']],
[maxLength out of valid range 0 to 4294967295])
[[parse-base-type '{"type": "string", "maxLength": -1}']],
[maxLength out of valid range 0 to 4294967295])
-OVSDB_CHECK_POSITIVE([uuid enum],
+OVSDB_CHECK_POSITIVE
_CPY
([uuid enum],
[[parse-base-type '{"type": "uuid", "enum": ["uuid", "36bf19c0-ad9d-4232-bb85-b3d73dfe2123"]}' ]],
[[{"enum":["uuid","36bf19c0-ad9d-4232-bb85-b3d73dfe2123"],"type":"uuid"}]])
[[parse-base-type '{"type": "uuid", "enum": ["uuid", "36bf19c0-ad9d-4232-bb85-b3d73dfe2123"]}' ]],
[[{"enum":["uuid","36bf19c0-ad9d-4232-bb85-b3d73dfe2123"],"type":"uuid"}]])
-OVSDB_CHECK_POSITIVE([uuid refTable],
+OVSDB_CHECK_POSITIVE
_CPY
([uuid refTable],
[[parse-base-type '{"type": "uuid", "refTable": "myTable"}' ]],
[{"refTable":"myTable","type":"uuid"}])
[[parse-base-type '{"type": "uuid", "refTable": "myTable"}' ]],
[{"refTable":"myTable","type":"uuid"}])
-OVSDB_CHECK_NEGATIVE([uuid refTable must be valid id],
+OVSDB_CHECK_NEGATIVE
_CPY
([uuid refTable must be valid id],
[[parse-base-type '{"type": "uuid", "refTable": "a-b-c"}' ]],
[Type mismatch for member 'refTable'])
[[parse-base-type '{"type": "uuid", "refTable": "a-b-c"}' ]],
[Type mismatch for member 'refTable'])
-OVSDB_CHECK_NEGATIVE([void is not a valid base-type],
+OVSDB_CHECK_NEGATIVE
_CPY
([void is not a valid base-type],
[[parse-base-type '["void"]' ]], ["void" is not an atomic-type])
[[parse-base-type '["void"]' ]], ["void" is not an atomic-type])
-OVSDB_CHECK_NEGATIVE(["type" member must be present],
+OVSDB_CHECK_NEGATIVE
_CPY
(["type" member must be present],
[[parse-base-type '{}']], [Parsing ovsdb type failed: Required 'type' member is missing.])
AT_BANNER([OVSDB -- simple types])
[[parse-base-type '{}']], [Parsing ovsdb type failed: Required 'type' member is missing.])
AT_BANNER([OVSDB -- simple types])
-OVSDB_CHECK_POSITIVE([simple integer],
+OVSDB_CHECK_POSITIVE
_CPY
([simple integer],
[[parse-type '["integer"]' ]], ["integer"])
[[parse-type '["integer"]' ]], ["integer"])
-OVSDB_CHECK_POSITIVE([simple real],
+OVSDB_CHECK_POSITIVE
_CPY
([simple real],
[[parse-type '["real"]' ]], ["real"])
[[parse-type '["real"]' ]], ["real"])
-OVSDB_CHECK_POSITIVE([simple boolean],
+OVSDB_CHECK_POSITIVE
_CPY
([simple boolean],
[[parse-type '["boolean"]' ]], ["boolean"])
[[parse-type '["boolean"]' ]], ["boolean"])
-OVSDB_CHECK_POSITIVE([simple string],
+OVSDB_CHECK_POSITIVE
_CPY
([simple string],
[[parse-type '["string"]' ]], ["string"])
[[parse-type '["string"]' ]], ["string"])
-OVSDB_CHECK_POSITIVE([simple uuid],
+OVSDB_CHECK_POSITIVE
_CPY
([simple uuid],
[[parse-type '["uuid"]' ]], ["uuid"])
[[parse-type '["uuid"]' ]], ["uuid"])
-OVSDB_CHECK_POSITIVE([integer in object],
+OVSDB_CHECK_POSITIVE
_CPY
([integer in object],
[[parse-type '{"key": "integer"}' ]], ["integer"])
[[parse-type '{"key": "integer"}' ]], ["integer"])
-OVSDB_CHECK_POSITIVE([real in object with explicit min and max],
+OVSDB_CHECK_POSITIVE
_CPY
([real in object with explicit min and max],
[[parse-type '{"key": "real", "min": 1, "max": 1}' ]], ["real"])
[[parse-type '{"key": "real", "min": 1, "max": 1}' ]], ["real"])
-OVSDB_CHECK_NEGATIVE([key type is required],
+OVSDB_CHECK_NEGATIVE
_CPY
([key type is required],
[[parse-type '{}' ]], [Required 'key' member is missing.])
[[parse-type '{}' ]], [Required 'key' member is missing.])
-OVSDB_CHECK_NEGATIVE([void is not a valid type],
+OVSDB_CHECK_NEGATIVE
_CPY
([void is not a valid type],
[[parse-type '["void"]' ]], ["void" is not an atomic-type])
AT_BANNER([OVSDB -- set types])
[[parse-type '["void"]' ]], ["void" is not an atomic-type])
AT_BANNER([OVSDB -- set types])
-OVSDB_CHECK_POSITIVE([optional boolean],
+OVSDB_CHECK_POSITIVE
_CPY
([optional boolean],
[[parse-type '{"key": "boolean", "min": 0}' ]],
[[{"key":"boolean","min":0}]],
[set])
[[parse-type '{"key": "boolean", "min": 0}' ]],
[[{"key":"boolean","min":0}]],
[set])
-OVSDB_CHECK_POSITIVE([set of 1 to 3 uuids],
+OVSDB_CHECK_POSITIVE
_CPY
([set of 1 to 3 uuids],
[[parse-type '{"key": "uuid", "min": 1, "max": 3}' ]],
[[{"key":"uuid","max":3}]])
[[parse-type '{"key": "uuid", "min": 1, "max": 3}' ]],
[[{"key":"uuid","max":3}]])
-OVSDB_CHECK_POSITIVE([set of 0 to 3 strings],
+OVSDB_CHECK_POSITIVE
_CPY
([set of 0 to 3 strings],
[[parse-type '{"key": "string", "min": 0, "max": 3}' ]],
[[{"key":"string","max":3,"min":0}]])
[[parse-type '{"key": "string", "min": 0, "max": 3}' ]],
[[{"key":"string","max":3,"min":0}]])
-OVSDB_CHECK_POSITIVE([set of 0 or more integers],
+OVSDB_CHECK_POSITIVE
_CPY
([set of 0 or more integers],
[[parse-type '{"key": "integer", "min": 0, "max": "unlimited"}']],
[[{"key":"integer","max":"unlimited","min":0}]])
[[parse-type '{"key": "integer", "min": 0, "max": "unlimited"}']],
[[{"key":"integer","max":"unlimited","min":0}]])
-OVSDB_CHECK_POSITIVE([set of 1 or more reals],
+OVSDB_CHECK_POSITIVE
_CPY
([set of 1 or more reals],
[[parse-type '{"key": "real", "min": 1, "max": "unlimited"}']],
[[{"key":"real","max":"unlimited"}]])
[[parse-type '{"key": "real", "min": 1, "max": "unlimited"}']],
[[{"key":"real","max":"unlimited"}]])
-OVSDB_CHECK_NEGATIVE([set max cannot be less than min],
+OVSDB_CHECK_NEGATIVE
_CPY
([set max cannot be less than min],
[[parse-type '{"key": "real", "min": 5, "max": 3}' ]],
[ovsdb type fails constraint checks])
[[parse-type '{"key": "real", "min": 5, "max": 3}' ]],
[ovsdb type fails constraint checks])
-OVSDB_CHECK_NEGATIVE([set max cannot be negative],
+OVSDB_CHECK_NEGATIVE
_CPY
([set max cannot be negative],
[[parse-type '{"key": "real", "max": -1}' ]],
[bad min or max value])
[[parse-type '{"key": "real", "max": -1}' ]],
[bad min or max value])
-OVSDB_CHECK_NEGATIVE([set min cannot be negative],
+OVSDB_CHECK_NEGATIVE
_CPY
([set min cannot be negative],
[[parse-type '{"key": "real", "min": -1}' ]],
[bad min or max value])
[[parse-type '{"key": "real", "min": -1}' ]],
[bad min or max value])
-OVSDB_CHECK_NEGATIVE([set min cannot be greater than one],
+OVSDB_CHECK_NEGATIVE
_CPY
([set min cannot be greater than one],
[[parse-type '{"key": "real", "min": 10, "max": "unlimited"}']],
[ovsdb type fails constraint checks])
AT_BANNER([OVSDB -- map types])
[[parse-type '{"key": "real", "min": 10, "max": "unlimited"}']],
[ovsdb type fails constraint checks])
AT_BANNER([OVSDB -- map types])
-OVSDB_CHECK_POSITIVE([map of 1 integer to boolean],
+OVSDB_CHECK_POSITIVE
_CPY
([map of 1 integer to boolean],
[[parse-type '{"key": "integer", "value": "boolean"}' ]],
[[{"key":"integer","value":"boolean"}]])
[[parse-type '{"key": "integer", "value": "boolean"}' ]],
[[{"key":"integer","value":"boolean"}]])
-OVSDB_CHECK_POSITIVE([map of 1 boolean to integer, explicit min and max],
+OVSDB_CHECK_POSITIVE
_CPY
([map of 1 boolean to integer, explicit min and max],
[[parse-type '{"key": "boolean", "value": "integer", "min": 1, "max": 1}' ]],
[[{"key":"boolean","value":"integer"}]])
[[parse-type '{"key": "boolean", "value": "integer", "min": 1, "max": 1}' ]],
[[{"key":"boolean","value":"integer"}]])
-OVSDB_CHECK_POSITIVE([map of 1 to 5 uuid to real],
+OVSDB_CHECK_POSITIVE
_CPY
([map of 1 to 5 uuid to real],
[[parse-type '{"key": "uuid", "value": "real", "min": 1, "max": 5}' ]],
[[{"key":"uuid","max":5,"value":"real"}]])
[[parse-type '{"key": "uuid", "value": "real", "min": 1, "max": 5}' ]],
[[{"key":"uuid","max":5,"value":"real"}]])
-OVSDB_CHECK_POSITIVE([map of 0 to 10 string to uuid],
+OVSDB_CHECK_POSITIVE
_CPY
([map of 0 to 10 string to uuid],
[[parse-type '{"key": "string", "value": "uuid", "min": 0, "max": 10}' ]],
[[{"key":"string","max":10,"min":0,"value":"uuid"}]])
[[parse-type '{"key": "string", "value": "uuid", "min": 0, "max": 10}' ]],
[[{"key":"string","max":10,"min":0,"value":"uuid"}]])
-OVSDB_CHECK_POSITIVE([map of 1 to 20 real to string],
+OVSDB_CHECK_POSITIVE
_CPY
([map of 1 to 20 real to string],
[[parse-type '{"key": "real", "value": "string", "min": 1, "max": 20}' ]],
[[{"key":"real","max":20,"value":"string"}]])
[[parse-type '{"key": "real", "value": "string", "min": 1, "max": 20}' ]],
[[{"key":"real","max":20,"value":"string"}]])
-OVSDB_CHECK_POSITIVE([map of 0 or more string to real],
+OVSDB_CHECK_POSITIVE
_CPY
([map of 0 or more string to real],
[[parse-type '{"key": "string", "value": "real", "min": 0, "max": "unlimited"}' ]],
[[{"key":"string","max":"unlimited","min":0,"value":"real"}]])
[[parse-type '{"key": "string", "value": "real", "min": 0, "max": "unlimited"}' ]],
[[{"key":"string","max":"unlimited","min":0,"value":"real"}]])
-OVSDB_CHECK_NEGATIVE([map key type is required],
+OVSDB_CHECK_NEGATIVE
_CPY
([map key type is required],
[[parse-type '{"value": "integer"}' ]],
[Required 'key' member is missing.])
[[parse-type '{"value": "integer"}' ]],
[Required 'key' member is missing.])