| 1 | { |
| 2 | "title": "mt0", |
| 3 | "description": "Plain CBOR integers storable as major type 0 (mt0), from RFC 8949 appendix A", |
| 4 | "tests": [ |
| 5 | { |
| 6 | "description": "mt0 zero", |
| 7 | "encoded": h'00', |
| 8 | "decoded": 0, |
| 9 | }, |
| 10 | { |
| 11 | "description": "mt0 one", |
| 12 | "encoded": h'01', |
| 13 | "decoded": 1, |
| 14 | }, |
| 15 | { |
| 16 | "description": "mt0 ten, not newline", |
| 17 | "encoded": h'0a', |
| 18 | "decoded": 10, |
| 19 | }, |
| 20 | { |
| 21 | "description": "mt0 largest 0-byte", |
| 22 | "encoded": h'17', |
| 23 | "decoded": 23, |
| 24 | }, |
| 25 | { |
| 26 | "description": "mt0 smallest 1-byte", |
| 27 | "encoded": h'1818', |
| 28 | "decoded": 24, |
| 29 | }, |
| 30 | { |
| 31 | "description": "mt0 second 1-byte", |
| 32 | "encoded": h'1819', |
| 33 | "decoded": 25, |
| 34 | }, |
| 35 | { |
| 36 | "description": "mt0 100", |
| 37 | "encoded": h'1864', |
| 38 | "decoded": 100, |
| 39 | }, |
| 40 | { |
| 41 | "description": "mt0 1000", |
| 42 | "encoded": h'1903e8', |
| 43 | "decoded": 1000, |
| 44 | }, |
| 45 | { |
| 46 | "description": "mt0 1000000", |
| 47 | "encoded": h'1a000f4240', |
| 48 | "decoded": 1000000, |
| 49 | }, |
| 50 | { |
| 51 | "description": "mt0 1000000000000", |
| 52 | "encoded": h'1b000000e8d4a51000', |
| 53 | "decoded": 1000000000000, |
| 54 | }, |
| 55 | { |
| 56 | "description": "mt0 largest", |
| 57 | "encoded": h'1bffffffffffffffff', |
| 58 | "decoded": 18446744073709551615, |
| 59 | }, |
| 60 | ] |
| 61 | } |
| 62 | |