| 1 | { |
| 2 | "title": "mt6", |
| 3 | "description": "Tags, from RFC 8949 appendix A", |
| 4 | "tests": [ |
| 5 | { |
| 6 | "description": "Bigint" |
| 7 | "encoded": h'c249010000000000000000', |
| 8 | "decoded": 18446744073709551616, |
| 9 | }, |
| 10 | { |
| 11 | "description": "Negative Bigint" |
| 12 | "encoded": h'c349010000000000000000', |
| 13 | "decoded": -18446744073709551617, |
| 14 | }, |
| 15 | { |
| 16 | "description": "RFC3339 Date/Time String" |
| 17 | "encoded": h'c074323031332d30332d32315432303a30343a30305a', |
| 18 | "decoded": 0("2013-03-21T20:04:00Z"), |
| 19 | "encodeOptions": { |
| 20 | "dateTag": 0, |
| 21 | }, |
| 22 | }, |
| 23 | { |
| 24 | "description": "Date/time as integer offset from epoch", |
| 25 | "encoded": h'c11a514b67b0', |
| 26 | "decoded": 1(1363896240), |
| 27 | }, |
| 28 | { |
| 29 | "description": "Date/time as float offset from epoch", |
| 30 | "encoded": h'c1fb41d452d9ec200000', |
| 31 | "decoded": 1(1363896240.5), |
| 32 | }, |
| 33 | { |
| 34 | "description": "Expected conversion to base16", |
| 35 | "encoded": h'd74401020304', |
| 36 | "decoded": 23(h'01020304') |
| 37 | }, |
| 38 | { |
| 39 | "description": "Expected conversion to base16 encoding", |
| 40 | "encoded": h'd818456449455446', |
| 41 | "decoded": 24(h'6449455446'), |
| 42 | }, |
| 43 | { |
| 44 | # Note: RFC 8949 doesn't include trailing slash, which should probably |
| 45 | # be there. |
| 46 | "description": "URL", |
| 47 | "encoded": h'd82077687474703a2f2f7777772e6578616d706c652e636f6d2f' |
| 48 | "decoded": 32("http://www.example.com/"), |
| 49 | }, |
| 50 | ], |
| 51 | } |
| 52 | |