X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=examples%2Fbiojson-doc%2Ftests%2FmaxItems.json;fp=examples%2Fbiojson-doc%2Ftests%2FmaxItems.json;h=3b53a6b371a7b6b45ed28dd8eb352703bd58bd0b;hb=1ba05544b34253204ef6410017a179c31fe5e23d;hp=0000000000000000000000000000000000000000;hpb=f8ce78dc02ce9d96129fcc4882749f43869928ff;p=jalview.git diff --git a/examples/biojson-doc/tests/maxItems.json b/examples/biojson-doc/tests/maxItems.json new file mode 100755 index 0000000..3b53a6b --- /dev/null +++ b/examples/biojson-doc/tests/maxItems.json @@ -0,0 +1,28 @@ +[ + { + "description": "maxItems validation", + "schema": {"maxItems": 2}, + "tests": [ + { + "description": "shorter is valid", + "data": [1], + "valid": true + }, + { + "description": "exact length is valid", + "data": [1, 2], + "valid": true + }, + { + "description": "too long is invalid", + "data": [1, 2, 3], + "valid": false + }, + { + "description": "ignores non-arrays", + "data": "foobar", + "valid": true + } + ] + } +]