[ { "description": "type checks", "schema": { "$comment": "on some architectures, some of these values may decode to strings or Math::BigInt objects", "type": "integer" }, "tests": [ { "description": "beyond int64 lower boundary", "data": -9223372036854775809, "valid": true }, { "description": "int64 lower boundary", "data": -9223372036854775808, "valid": true }, { "description": "beyond int32 lower boundary", "data": -2147483649, "valid": true }, { "description": "int32 lower boundary", "data": -2147483648, "valid": true }, { "description": "zero", "data": 0, "valid": true }, { "description": "int32 upper boundary", "data": 2147483647, "valid": true }, { "description": "beyond int32 upper boundary", "data": 2147483648, "valid": true }, { "description": "upper int64 boundary", "data": 9223372036854775807, "valid": true }, { "description": "beyond int64 upper boundary", "data": 9223372036854775808, "valid": true }, { "description": "uint64 upper boundary", "data": 18446744073709551615, "valid": true }, { "description": "beyond uint64 upper boundary", "data": 18446744073709551616, "valid": true } ] }, { "description": "int32 range checks", "schema": { "$comment": "on some architectures, some of these values may decode to strings", "minimum": -2147483648, "maximum": 2147483647 }, "tests": [ { "description": "beyond lower boundary", "data": -2147483649, "valid": false }, { "description": "lower boundary", "data": -2147483648, "valid": true }, { "description": "zero", "data": 0, "valid": true }, { "description": "upper boundary", "data": 2147483647, "valid": true }, { "description": "beyond upper boundary", "data": 2147483648, "valid": false } ] }, { "description": "int64 range checks", "schema": { "$comment": "on some architectures, some of these values may decode to strings", "minimum": -9223372036854775808, "maximum": 9223372036854775807 }, "tests": [ { "description": "beyond lower boundary", "data": -9223372036854775809, "valid": false }, { "description": "lower boundary", "data": -9223372036854775808, "valid": true }, { "description": "zero", "data": 0, "valid": true }, { "description": "upper boundary", "data": 9223372036854775807, "valid": true }, { "description": "beyond upper boundary", "data": 9223372036854775808, "valid": false } ] }, { "description": "equality checks", "schema": { "$comment": "on some architectures, some of these values may json-decode to strings", "enum": [ -9223372036854775809, -9223372036854775808, -2147483649, -2147483648, 0, 2147483647, 2147483648, 9223372036854775807, 9223372036854775808 ] }, "tests": [ { "description": "beyond int64 lower boundary", "data": -9223372036854775809, "valid": true }, { "description": "int64 lower boundary", "data": -9223372036854775808, "valid": true }, { "description": "beyond int32 lower boundary", "data": -2147483649, "valid": true }, { "description": "int32 lower boundary", "data": -2147483648, "valid": true }, { "description": "zero", "data": 0, "valid": true }, { "description": "one", "data": 1, "valid": false }, { "description": "int32 upper boundary", "data": 2147483647, "valid": true }, { "description": "beyond int32 upper boundary", "data": 2147483648, "valid": true }, { "description": "int64 upper boundary", "data": 9223372036854775807, "valid": true }, { "description": "beyond int64 upper boundary", "data": 9223372036854775808, "valid": true } ] } ]