multipleOf.json revision 263646
1263646Sbapt[ 2263646Sbapt { 3263646Sbapt "description": "by int", 4263646Sbapt "schema": {"multipleOf": 2}, 5263646Sbapt "tests": [ 6263646Sbapt { 7263646Sbapt "description": "int by int", 8263646Sbapt "data": 10, 9263646Sbapt "valid": true 10263646Sbapt }, 11263646Sbapt { 12263646Sbapt "description": "int by int fail", 13263646Sbapt "data": 7, 14263646Sbapt "valid": false 15263646Sbapt }, 16263646Sbapt { 17263646Sbapt "description": "ignores non-numbers", 18263646Sbapt "data": "foo", 19263646Sbapt "valid": true 20263646Sbapt } 21263646Sbapt ] 22263646Sbapt }, 23263646Sbapt { 24263646Sbapt "description": "by number", 25263646Sbapt "schema": {"multipleOf": 1.5}, 26263646Sbapt "tests": [ 27263646Sbapt { 28263646Sbapt "description": "zero is multiple of anything", 29263646Sbapt "data": 0, 30263646Sbapt "valid": true 31263646Sbapt }, 32263646Sbapt { 33263646Sbapt "description": "4.5 is multiple of 1.5", 34263646Sbapt "data": 4.5, 35263646Sbapt "valid": true 36263646Sbapt }, 37263646Sbapt { 38263646Sbapt "description": "35 is not multiple of 1.5", 39263646Sbapt "data": 35, 40263646Sbapt "valid": false 41263646Sbapt } 42263646Sbapt ] 43263646Sbapt }, 44263646Sbapt { 45263646Sbapt "description": "by small number", 46263646Sbapt "schema": {"multipleOf": 0.0001}, 47263646Sbapt "tests": [ 48263646Sbapt { 49263646Sbapt "description": "0.0075 is multiple of 0.0001", 50263646Sbapt "data": 0.0075, 51263646Sbapt "valid": true 52263646Sbapt }, 53263646Sbapt { 54263646Sbapt "description": "0.00751 is not multiple of 0.0001", 55263646Sbapt "data": 0.00751, 56263646Sbapt "valid": false 57263646Sbapt } 58263646Sbapt ] 59263646Sbapt } 60263646Sbapt] 61