UNPKG

structured-field-values

Version:

Implementation of Structured Field Values from IETF httpbis RFC8941

58 lines (56 loc) 1.53 kB
[ { "name": "too big positive integer - serialize", "header_type": "item", "expected": [1000000000000000, []], "must_fail": true }, { "name": "too big negative integer - serialize", "header_type": "item", "expected": [-1000000000000000, []], "must_fail": true }, { "name": "too big positive decimal - serialize", "header_type": "item", "expected": [1000000000000.1, []], "must_fail": true }, { "name": "too big negative decimal - serialize", "header_type": "item", "expected": [-1000000000000.1, []], "must_fail": true }, { "name": "round positive odd decimal - serialize", "header_type": "item", "expected": [0.0015, []], "canonical": ["0.002"] }, { "name": "round positive even decimal - serialize", "header_type": "item", "expected": [0.0025, []], "canonical": ["0.002"] }, { "name": "round negative odd decimal - serialize", "header_type": "item", "expected": [-0.0015, []], "canonical": ["-0.002"] }, { "name": "round negative even decimal - serialize", "header_type": "item", "expected": [-0.0025, []], "canonical": ["-0.002"] }, { "name": "decimal round up to integer part - serialize", "header_type": "item", "expected": [9.9995, []], "canonical": ["10.0"] } ]