| Exercise WebIDL type conversions. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| converter = window.internals.typeConversions() |
| |
| PASS 'testLong' in converter is true |
| PASS typeof converter.testLong === 'number' is true |
| converter.testLong = 0 |
| PASS converter.testLong is 0 |
| converter.testLong = -1 |
| PASS converter.testLong is -1 |
| converter.testLong = 1 |
| PASS converter.testLong is 1 |
| converter.testLong = 0x7F |
| PASS converter.testLong is 0x7F |
| converter.testLong = 0x80 |
| PASS converter.testLong is 0x80 |
| converter.testLong = 0xFF |
| PASS converter.testLong is 0xFF |
| converter.testLong = -0x80 |
| PASS converter.testLong is -0x80 |
| converter.testLong = -0x81 |
| PASS converter.testLong is -0x81 |
| converter.testLong = 0x7FFF |
| PASS converter.testLong is 0x7FFF |
| converter.testLong = 0x8000 |
| PASS converter.testLong is 0x8000 |
| converter.testLong = 0xFFFF |
| PASS converter.testLong is 0xFFFF |
| converter.testLong = -0x8000 |
| PASS converter.testLong is -0x8000 |
| converter.testLong = -0x8001 |
| PASS converter.testLong is -0x8001 |
| converter.testLong = 0x7FFFFFFF |
| PASS converter.testLong is 0x7FFFFFFF |
| converter.testLong = 0x80000000 |
| PASS converter.testLong is -0x80000000 |
| converter.testLong = 0xFFFFFFFF |
| PASS converter.testLong is -1 |
| converter.testLong = -0x80000000 |
| PASS converter.testLong is -0x80000000 |
| converter.testLong = -0x80000001 |
| PASS converter.testLong is 0x7FFFFFFF |
| converter.testLong = 0xDCBA9876543210 |
| PASS converter.testLong is 0x76543210 |
| converter.testLong = Number.MAX_VALUE |
| PASS converter.testLong is 0 |
| converter.testLong = Number.MIN_VALUE |
| PASS converter.testLong is 0 |
| converter.testLong = -Number.MAX_VALUE |
| PASS converter.testLong is 0 |
| converter.testLong = -Number.MIN_VALUE |
| PASS converter.testLong is 0 |
| converter.testLong = 1.99 |
| PASS converter.testLong is 1 |
| converter.testLong = -1.99 |
| PASS converter.testLong is -1 |
| converter.testLong = Infinity |
| PASS converter.testLong is 0 |
| converter.testLong = -Infinity |
| PASS converter.testLong is 0 |
| converter.testLong = NaN |
| PASS converter.testLong is 0 |
| converter.testLong = false |
| PASS converter.testLong is 0 |
| converter.testLong = true |
| PASS converter.testLong is 1 |
| converter.testLong = '' |
| PASS converter.testLong is 0 |
| converter.testLong = '1' |
| PASS converter.testLong is 1 |
| converter.testLong = 'abc' |
| PASS converter.testLong is 0 |
| converter.testLong = null |
| PASS converter.testLong is 0 |
| converter.testLong = undefined |
| PASS converter.testLong is 0 |
| PASS converter.testLong = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom. |
| |
| PASS 'testEnforceRangeLong' in converter is true |
| PASS typeof converter.testEnforceRangeLong === 'number' is true |
| converter.testEnforceRangeLong = 0 |
| PASS converter.testEnforceRangeLong is 0 |
| converter.testEnforceRangeLong = -1 |
| PASS converter.testEnforceRangeLong is -1 |
| converter.testEnforceRangeLong = 1 |
| PASS converter.testEnforceRangeLong is 1 |
| converter.testEnforceRangeLong = 0x7F |
| PASS converter.testEnforceRangeLong is 0x7F |
| converter.testEnforceRangeLong = 0x80 |
| PASS converter.testEnforceRangeLong is 0x80 |
| converter.testEnforceRangeLong = 0xFF |
| PASS converter.testEnforceRangeLong is 0xFF |
| converter.testEnforceRangeLong = -0x80 |
| PASS converter.testEnforceRangeLong is -0x80 |
| converter.testEnforceRangeLong = -0x81 |
| PASS converter.testEnforceRangeLong is -0x81 |
| converter.testEnforceRangeLong = 0x7FFF |
| PASS converter.testEnforceRangeLong is 0x7FFF |
| converter.testEnforceRangeLong = 0x8000 |
| PASS converter.testEnforceRangeLong is 0x8000 |
| converter.testEnforceRangeLong = 0xFFFF |
| PASS converter.testEnforceRangeLong is 0xFFFF |
| converter.testEnforceRangeLong = -0x8000 |
| PASS converter.testEnforceRangeLong is -0x8000 |
| converter.testEnforceRangeLong = -0x8001 |
| PASS converter.testEnforceRangeLong is -0x8001 |
| converter.testEnforceRangeLong = 0x7FFFFFFF |
| PASS converter.testEnforceRangeLong is 0x7FFFFFFF |
| PASS converter.testEnforceRangeLong = 0x80000000 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeLong = 0xFFFFFFFF threw exception TypeError: Type error. |
| converter.testEnforceRangeLong = -0x80000000 |
| PASS converter.testEnforceRangeLong is -0x80000000 |
| PASS converter.testEnforceRangeLong = -0x80000001 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeLong = 0xDCBA9876543210 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeLong = Number.MAX_VALUE threw exception TypeError: Type error. |
| converter.testEnforceRangeLong = Number.MIN_VALUE |
| PASS converter.testEnforceRangeLong is 0 |
| PASS converter.testEnforceRangeLong = -Number.MAX_VALUE threw exception TypeError: Type error. |
| converter.testEnforceRangeLong = -Number.MIN_VALUE |
| PASS converter.testEnforceRangeLong is 0 |
| converter.testEnforceRangeLong = 1.99 |
| PASS converter.testEnforceRangeLong is 1 |
| converter.testEnforceRangeLong = -1.99 |
| PASS converter.testEnforceRangeLong is -1 |
| PASS converter.testEnforceRangeLong = Infinity threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeLong = -Infinity threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeLong = NaN threw exception TypeError: Type error. |
| converter.testEnforceRangeLong = false |
| PASS converter.testEnforceRangeLong is 0 |
| converter.testEnforceRangeLong = true |
| PASS converter.testEnforceRangeLong is 1 |
| converter.testEnforceRangeLong = '' |
| PASS converter.testEnforceRangeLong is 0 |
| converter.testEnforceRangeLong = '1' |
| PASS converter.testEnforceRangeLong is 1 |
| PASS converter.testEnforceRangeLong = 'abc' threw exception TypeError: Type error. |
| converter.testEnforceRangeLong = null |
| PASS converter.testEnforceRangeLong is 0 |
| PASS converter.testEnforceRangeLong = undefined threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeLong = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom. |
| |
| PASS 'testUnsignedLong' in converter is true |
| PASS typeof converter.testUnsignedLong === 'number' is true |
| converter.testUnsignedLong = 0 |
| PASS converter.testUnsignedLong is 0 |
| converter.testUnsignedLong = -1 |
| PASS converter.testUnsignedLong is 0xFFFFFFFF |
| converter.testUnsignedLong = 1 |
| PASS converter.testUnsignedLong is 1 |
| converter.testUnsignedLong = 0x7F |
| PASS converter.testUnsignedLong is 0x7F |
| converter.testUnsignedLong = 0x80 |
| PASS converter.testUnsignedLong is 0x80 |
| converter.testUnsignedLong = 0xFF |
| PASS converter.testUnsignedLong is 0xFF |
| converter.testUnsignedLong = -0x80 |
| PASS converter.testUnsignedLong is 0xFFFFFF80 |
| converter.testUnsignedLong = -0x81 |
| PASS converter.testUnsignedLong is 0xFFFFFF7F |
| converter.testUnsignedLong = 0x7FFF |
| PASS converter.testUnsignedLong is 0x7FFF |
| converter.testUnsignedLong = 0x8000 |
| PASS converter.testUnsignedLong is 0x8000 |
| converter.testUnsignedLong = 0xFFFF |
| PASS converter.testUnsignedLong is 0xFFFF |
| converter.testUnsignedLong = -0x8000 |
| PASS converter.testUnsignedLong is 0xFFFF8000 |
| converter.testUnsignedLong = -0x8001 |
| PASS converter.testUnsignedLong is 0xFFFF7FFF |
| converter.testUnsignedLong = 0x7FFFFFFF |
| PASS converter.testUnsignedLong is 0x7FFFFFFF |
| converter.testUnsignedLong = 0x80000000 |
| PASS converter.testUnsignedLong is 0x80000000 |
| converter.testUnsignedLong = 0xFFFFFFFF |
| PASS converter.testUnsignedLong is 0xFFFFFFFF |
| converter.testUnsignedLong = -0x80000000 |
| PASS converter.testUnsignedLong is 0x80000000 |
| converter.testUnsignedLong = -0x80000001 |
| PASS converter.testUnsignedLong is 0x7FFFFFFF |
| converter.testUnsignedLong = 0xDCBA9876543210 |
| PASS converter.testUnsignedLong is 0x76543210 |
| converter.testUnsignedLong = Number.MAX_VALUE |
| PASS converter.testUnsignedLong is 0 |
| converter.testUnsignedLong = Number.MIN_VALUE |
| PASS converter.testUnsignedLong is 0 |
| converter.testUnsignedLong = -Number.MAX_VALUE |
| PASS converter.testUnsignedLong is 0 |
| converter.testUnsignedLong = -Number.MIN_VALUE |
| PASS converter.testUnsignedLong is 0 |
| converter.testUnsignedLong = 1.99 |
| PASS converter.testUnsignedLong is 1 |
| converter.testUnsignedLong = -1.99 |
| PASS converter.testUnsignedLong is 0xFFFFFFFF |
| converter.testUnsignedLong = Infinity |
| PASS converter.testUnsignedLong is 0 |
| converter.testUnsignedLong = -Infinity |
| PASS converter.testUnsignedLong is 0 |
| converter.testUnsignedLong = NaN |
| PASS converter.testUnsignedLong is 0 |
| converter.testUnsignedLong = false |
| PASS converter.testUnsignedLong is 0 |
| converter.testUnsignedLong = true |
| PASS converter.testUnsignedLong is 1 |
| converter.testUnsignedLong = '' |
| PASS converter.testUnsignedLong is 0 |
| converter.testUnsignedLong = '1' |
| PASS converter.testUnsignedLong is 1 |
| converter.testUnsignedLong = 'abc' |
| PASS converter.testUnsignedLong is 0 |
| converter.testUnsignedLong = null |
| PASS converter.testUnsignedLong is 0 |
| converter.testUnsignedLong = undefined |
| PASS converter.testUnsignedLong is 0 |
| PASS converter.testUnsignedLong = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom. |
| |
| PASS 'testEnforceRangeUnsignedLong' in converter is true |
| PASS typeof converter.testEnforceRangeUnsignedLong === 'number' is true |
| converter.testEnforceRangeUnsignedLong = 0 |
| PASS converter.testEnforceRangeUnsignedLong is 0 |
| PASS converter.testEnforceRangeUnsignedLong = -1 threw exception TypeError: Type error. |
| converter.testEnforceRangeUnsignedLong = 1 |
| PASS converter.testEnforceRangeUnsignedLong is 1 |
| converter.testEnforceRangeUnsignedLong = 0x7F |
| PASS converter.testEnforceRangeUnsignedLong is 0x7F |
| converter.testEnforceRangeUnsignedLong = 0x80 |
| PASS converter.testEnforceRangeUnsignedLong is 0x80 |
| converter.testEnforceRangeUnsignedLong = 0xFF |
| PASS converter.testEnforceRangeUnsignedLong is 0xFF |
| PASS converter.testEnforceRangeUnsignedLong = -0x80 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLong = -0x81 threw exception TypeError: Type error. |
| converter.testEnforceRangeUnsignedLong = 0x7FFF |
| PASS converter.testEnforceRangeUnsignedLong is 0x7FFF |
| converter.testEnforceRangeUnsignedLong = 0x8000 |
| PASS converter.testEnforceRangeUnsignedLong is 0x8000 |
| converter.testEnforceRangeUnsignedLong = 0xFFFF |
| PASS converter.testEnforceRangeUnsignedLong is 0xFFFF |
| PASS converter.testEnforceRangeUnsignedLong = -0x8000 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLong = -0x8001 threw exception TypeError: Type error. |
| converter.testEnforceRangeUnsignedLong = 0x7FFFFFFF |
| PASS converter.testEnforceRangeUnsignedLong is 0x7FFFFFFF |
| converter.testEnforceRangeUnsignedLong = 0x80000000 |
| PASS converter.testEnforceRangeUnsignedLong is 0x80000000 |
| converter.testEnforceRangeUnsignedLong = 0xFFFFFFFF |
| PASS converter.testEnforceRangeUnsignedLong is 0xFFFFFFFF |
| PASS converter.testEnforceRangeUnsignedLong = -0x80000000 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLong = -0x80000001 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLong = 0xDCBA9876543210 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLong = Number.MAX_VALUE threw exception TypeError: Type error. |
| converter.testEnforceRangeUnsignedLong = Number.MIN_VALUE |
| PASS converter.testEnforceRangeUnsignedLong is 0 |
| PASS converter.testEnforceRangeUnsignedLong = -Number.MAX_VALUE threw exception TypeError: Type error. |
| converter.testEnforceRangeUnsignedLong = -Number.MIN_VALUE |
| PASS converter.testEnforceRangeUnsignedLong is 0 |
| converter.testEnforceRangeUnsignedLong = 1.99 |
| PASS converter.testEnforceRangeUnsignedLong is 1 |
| PASS converter.testEnforceRangeUnsignedLong = -1.99 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLong = Infinity threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLong = -Infinity threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLong = NaN threw exception TypeError: Type error. |
| converter.testEnforceRangeUnsignedLong = false |
| PASS converter.testEnforceRangeUnsignedLong is 0 |
| converter.testEnforceRangeUnsignedLong = true |
| PASS converter.testEnforceRangeUnsignedLong is 1 |
| converter.testEnforceRangeUnsignedLong = '' |
| PASS converter.testEnforceRangeUnsignedLong is 0 |
| converter.testEnforceRangeUnsignedLong = '1' |
| PASS converter.testEnforceRangeUnsignedLong is 1 |
| PASS converter.testEnforceRangeUnsignedLong = 'abc' threw exception TypeError: Type error. |
| converter.testEnforceRangeUnsignedLong = null |
| PASS converter.testEnforceRangeUnsignedLong is 0 |
| PASS converter.testEnforceRangeUnsignedLong = undefined threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLong = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom. |
| |
| PASS 'testLongLong' in converter is true |
| PASS typeof converter.testLongLong === 'number' is true |
| converter.testLongLong = 0 |
| PASS converter.testLongLong is 0 |
| converter.testLongLong = -1 |
| PASS converter.testLongLong is -1 |
| converter.testLongLong = 1 |
| PASS converter.testLongLong is 1 |
| converter.testLongLong = 0x7F |
| PASS converter.testLongLong is 0x7F |
| converter.testLongLong = 0x80 |
| PASS converter.testLongLong is 0x80 |
| converter.testLongLong = 0xFF |
| PASS converter.testLongLong is 0xFF |
| converter.testLongLong = -0x80 |
| PASS converter.testLongLong is -0x80 |
| converter.testLongLong = -0x81 |
| PASS converter.testLongLong is -0x81 |
| converter.testLongLong = 0x7FFF |
| PASS converter.testLongLong is 0x7FFF |
| converter.testLongLong = 0x8000 |
| PASS converter.testLongLong is 0x8000 |
| converter.testLongLong = 0xFFFF |
| PASS converter.testLongLong is 0xFFFF |
| converter.testLongLong = -0x8000 |
| PASS converter.testLongLong is -0x8000 |
| converter.testLongLong = -0x8001 |
| PASS converter.testLongLong is -0x8001 |
| converter.testLongLong = 0x7FFFFFFF |
| PASS converter.testLongLong is 0x7FFFFFFF |
| converter.testLongLong = 0x80000000 |
| PASS converter.testLongLong is 0x80000000 |
| converter.testLongLong = 0xFFFFFFFF |
| PASS converter.testLongLong is 0xFFFFFFFF |
| converter.testLongLong = -0x80000000 |
| PASS converter.testLongLong is -0x80000000 |
| converter.testLongLong = -0x80000001 |
| PASS converter.testLongLong is -0x80000001 |
| converter.testLongLong = 0xDCBA9876543210 |
| PASS converter.testLongLong is 0xDCBA9876543210 |
| converter.testLongLong = Number.MIN_VALUE |
| PASS converter.testLongLong is 0 |
| converter.testLongLong = -Number.MIN_VALUE |
| PASS converter.testLongLong is 0 |
| converter.testLongLong = Number.MAX_VALUE |
| PASS converter.testLongLong is 0 |
| converter.testLongLong = -Number.MAX_VALUE |
| PASS converter.testLongLong is 0 |
| converter.testLongLong = 1.99 |
| PASS converter.testLongLong is 1 |
| converter.testLongLong = -1.99 |
| PASS converter.testLongLong is -1 |
| converter.testLongLong = Infinity |
| PASS converter.testLongLong is 0 |
| converter.testLongLong = -Infinity |
| PASS converter.testLongLong is 0 |
| converter.testLongLong = NaN |
| PASS converter.testLongLong is 0 |
| converter.testLongLong = false |
| PASS converter.testLongLong is 0 |
| converter.testLongLong = true |
| PASS converter.testLongLong is 1 |
| converter.testLongLong = '' |
| PASS converter.testLongLong is 0 |
| converter.testLongLong = '1' |
| PASS converter.testLongLong is 1 |
| converter.testLongLong = 'abc' |
| PASS converter.testLongLong is 0 |
| converter.testLongLong = null |
| PASS converter.testLongLong is 0 |
| converter.testLongLong = undefined |
| PASS converter.testLongLong is 0 |
| PASS converter.testLongLong = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom. |
| |
| PASS 'testEnforceRangeLongLong' in converter is true |
| PASS typeof converter.testEnforceRangeLongLong === 'number' is true |
| converter.testEnforceRangeLongLong = 0 |
| PASS converter.testEnforceRangeLongLong is 0 |
| converter.testEnforceRangeLongLong = -1 |
| PASS converter.testEnforceRangeLongLong is -1 |
| converter.testEnforceRangeLongLong = 1 |
| PASS converter.testEnforceRangeLongLong is 1 |
| converter.testEnforceRangeLongLong = 0x7F |
| PASS converter.testEnforceRangeLongLong is 0x7F |
| converter.testEnforceRangeLongLong = 0x80 |
| PASS converter.testEnforceRangeLongLong is 0x80 |
| converter.testEnforceRangeLongLong = 0xFF |
| PASS converter.testEnforceRangeLongLong is 0xFF |
| converter.testEnforceRangeLongLong = -0x80 |
| PASS converter.testEnforceRangeLongLong is -0x80 |
| converter.testEnforceRangeLongLong = -0x81 |
| PASS converter.testEnforceRangeLongLong is -0x81 |
| converter.testEnforceRangeLongLong = 0x7FFF |
| PASS converter.testEnforceRangeLongLong is 0x7FFF |
| converter.testEnforceRangeLongLong = 0x8000 |
| PASS converter.testEnforceRangeLongLong is 0x8000 |
| converter.testEnforceRangeLongLong = 0xFFFF |
| PASS converter.testEnforceRangeLongLong is 0xFFFF |
| converter.testEnforceRangeLongLong = -0x8000 |
| PASS converter.testEnforceRangeLongLong is -0x8000 |
| converter.testEnforceRangeLongLong = -0x8001 |
| PASS converter.testEnforceRangeLongLong is -0x8001 |
| converter.testEnforceRangeLongLong = 0x7FFFFFFF |
| PASS converter.testEnforceRangeLongLong is 0x7FFFFFFF |
| converter.testEnforceRangeLongLong = 0x80000000 |
| PASS converter.testEnforceRangeLongLong is 0x80000000 |
| converter.testEnforceRangeLongLong = 0xFFFFFFFF |
| PASS converter.testEnforceRangeLongLong is 0xFFFFFFFF |
| converter.testEnforceRangeLongLong = -0x80000000 |
| PASS converter.testEnforceRangeLongLong is -0x80000000 |
| converter.testEnforceRangeLongLong = -0x80000001 |
| PASS converter.testEnforceRangeLongLong is -0x80000001 |
| PASS converter.testEnforceRangeLongLong = 0xDCBA9876543210 threw exception TypeError: Type error. |
| converter.testEnforceRangeLongLong = Number.MIN_VALUE |
| PASS converter.testEnforceRangeLongLong is 0 |
| converter.testEnforceRangeLongLong = -Number.MIN_VALUE |
| PASS converter.testEnforceRangeLongLong is 0 |
| PASS converter.testEnforceRangeLongLong = Number.MAX_VALUE threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeLongLong = -Number.MAX_VALUE threw exception TypeError: Type error. |
| converter.testEnforceRangeLongLong = 1.99 |
| PASS converter.testEnforceRangeLongLong is 1 |
| converter.testEnforceRangeLongLong = -1.99 |
| PASS converter.testEnforceRangeLongLong is -1 |
| PASS converter.testEnforceRangeLongLong = Infinity threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeLongLong = -Infinity threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeLongLong = NaN threw exception TypeError: Type error. |
| converter.testEnforceRangeLongLong = false |
| PASS converter.testEnforceRangeLongLong is 0 |
| converter.testEnforceRangeLongLong = true |
| PASS converter.testEnforceRangeLongLong is 1 |
| converter.testEnforceRangeLongLong = '' |
| PASS converter.testEnforceRangeLongLong is 0 |
| converter.testEnforceRangeLongLong = '1' |
| PASS converter.testEnforceRangeLongLong is 1 |
| PASS converter.testEnforceRangeLongLong = 'abc' threw exception TypeError: Type error. |
| converter.testEnforceRangeLongLong = null |
| PASS converter.testEnforceRangeLongLong is 0 |
| PASS converter.testEnforceRangeLongLong = undefined threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeLongLong = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom. |
| |
| PASS 'testUnsignedLongLong' in converter is true |
| PASS typeof converter.testUnsignedLongLong === 'number' is true |
| converter.testUnsignedLongLong = 0 |
| PASS converter.testUnsignedLongLong is 0 |
| converter.testUnsignedLongLong = -1 |
| PASS converter.testUnsignedLongLong is 0xFFFFFFFFFFFFFFFF |
| converter.testUnsignedLongLong = 1 |
| PASS converter.testUnsignedLongLong is 1 |
| converter.testUnsignedLongLong = 0x7F |
| PASS converter.testUnsignedLongLong is 0x7F |
| converter.testUnsignedLongLong = 0x80 |
| PASS converter.testUnsignedLongLong is 0x80 |
| converter.testUnsignedLongLong = 0xFF |
| PASS converter.testUnsignedLongLong is 0xFF |
| converter.testUnsignedLongLong = -0x80 |
| PASS converter.testUnsignedLongLong is 0xFFFFFFFFFFFFFF80 |
| converter.testUnsignedLongLong = -0x81 |
| PASS converter.testUnsignedLongLong is 0xFFFFFFFFFFFFFF7F |
| converter.testUnsignedLongLong = 0x7FFF |
| PASS converter.testUnsignedLongLong is 0x7FFF |
| converter.testUnsignedLongLong = 0x8000 |
| PASS converter.testUnsignedLongLong is 0x8000 |
| converter.testUnsignedLongLong = 0xFFFF |
| PASS converter.testUnsignedLongLong is 0xFFFF |
| converter.testUnsignedLongLong = -0x8000 |
| PASS converter.testUnsignedLongLong is 0xFFFFFFFFFFFF8000 |
| converter.testUnsignedLongLong = -0x8001 |
| PASS converter.testUnsignedLongLong is 0xFFFFFFFFFFFF7FFF |
| converter.testUnsignedLongLong = 0x7FFFFFFF |
| PASS converter.testUnsignedLongLong is 0x7FFFFFFF |
| converter.testUnsignedLongLong = 0x80000000 |
| PASS converter.testUnsignedLongLong is 0x80000000 |
| converter.testUnsignedLongLong = 0xFFFFFFFF |
| PASS converter.testUnsignedLongLong is 0xFFFFFFFF |
| converter.testUnsignedLongLong = -0x80000000 |
| PASS converter.testUnsignedLongLong is 0xFFFFFFFF80000000 |
| converter.testUnsignedLongLong = -0x80000001 |
| PASS converter.testUnsignedLongLong is 0xFFFFFFFF7FFFFFFF |
| converter.testUnsignedLongLong = 0xDCBA9876543210 |
| PASS converter.testUnsignedLongLong is 0xDCBA9876543210 |
| converter.testUnsignedLongLong = Number.MIN_VALUE |
| PASS converter.testUnsignedLongLong is 0 |
| converter.testUnsignedLongLong = -Number.MIN_VALUE |
| PASS converter.testUnsignedLongLong is 0 |
| converter.testUnsignedLongLong = Number.MAX_VALUE |
| PASS converter.testUnsignedLongLong is 0 |
| converter.testUnsignedLongLong = -Number.MAX_VALUE |
| PASS converter.testUnsignedLongLong is 0 |
| converter.testUnsignedLongLong = 1.99 |
| PASS converter.testUnsignedLongLong is 1 |
| converter.testUnsignedLongLong = -1.99 |
| PASS converter.testUnsignedLongLong is 0xFFFFFFFFFFFFFFFF |
| converter.testUnsignedLongLong = Infinity |
| PASS converter.testUnsignedLongLong is 0 |
| converter.testUnsignedLongLong = -Infinity |
| PASS converter.testUnsignedLongLong is 0 |
| converter.testUnsignedLongLong = NaN |
| PASS converter.testUnsignedLongLong is 0 |
| converter.testUnsignedLongLong = false |
| PASS converter.testUnsignedLongLong is 0 |
| converter.testUnsignedLongLong = true |
| PASS converter.testUnsignedLongLong is 1 |
| converter.testUnsignedLongLong = '' |
| PASS converter.testUnsignedLongLong is 0 |
| converter.testUnsignedLongLong = '1' |
| PASS converter.testUnsignedLongLong is 1 |
| converter.testUnsignedLongLong = 'abc' |
| PASS converter.testUnsignedLongLong is 0 |
| converter.testUnsignedLongLong = null |
| PASS converter.testUnsignedLongLong is 0 |
| converter.testUnsignedLongLong = undefined |
| PASS converter.testUnsignedLongLong is 0 |
| PASS converter.testUnsignedLongLong = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom. |
| |
| PASS 'testEnforceRangeUnsignedLongLong' in converter is true |
| PASS typeof converter.testEnforceRangeUnsignedLongLong === 'number' is true |
| converter.testEnforceRangeUnsignedLongLong = 0 |
| PASS converter.testEnforceRangeUnsignedLongLong is 0 |
| PASS converter.testEnforceRangeUnsignedLongLong = -1 threw exception TypeError: Type error. |
| converter.testEnforceRangeUnsignedLongLong = 1 |
| PASS converter.testEnforceRangeUnsignedLongLong is 1 |
| converter.testEnforceRangeUnsignedLongLong = 0x7F |
| PASS converter.testEnforceRangeUnsignedLongLong is 0x7F |
| converter.testEnforceRangeUnsignedLongLong = 0x80 |
| PASS converter.testEnforceRangeUnsignedLongLong is 0x80 |
| converter.testEnforceRangeUnsignedLongLong = 0xFF |
| PASS converter.testEnforceRangeUnsignedLongLong is 0xFF |
| PASS converter.testEnforceRangeUnsignedLongLong = -0x80 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLongLong = -0x81 threw exception TypeError: Type error. |
| converter.testEnforceRangeUnsignedLongLong = 0x7FFF |
| PASS converter.testEnforceRangeUnsignedLongLong is 0x7FFF |
| converter.testEnforceRangeUnsignedLongLong = 0x8000 |
| PASS converter.testEnforceRangeUnsignedLongLong is 0x8000 |
| converter.testEnforceRangeUnsignedLongLong = 0xFFFF |
| PASS converter.testEnforceRangeUnsignedLongLong is 0xFFFF |
| PASS converter.testEnforceRangeUnsignedLongLong = -0x8000 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLongLong = -0x8001 threw exception TypeError: Type error. |
| converter.testEnforceRangeUnsignedLongLong = 0x7FFFFFFF |
| PASS converter.testEnforceRangeUnsignedLongLong is 0x7FFFFFFF |
| converter.testEnforceRangeUnsignedLongLong = 0x80000000 |
| PASS converter.testEnforceRangeUnsignedLongLong is 0x80000000 |
| converter.testEnforceRangeUnsignedLongLong = 0xFFFFFFFF |
| PASS converter.testEnforceRangeUnsignedLongLong is 0xFFFFFFFF |
| PASS converter.testEnforceRangeUnsignedLongLong = -0x80000000 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLongLong = -0x80000001 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLongLong = 0xDCBA9876543210 threw exception TypeError: Type error. |
| converter.testEnforceRangeUnsignedLongLong = Number.MIN_VALUE |
| PASS converter.testEnforceRangeUnsignedLongLong is 0 |
| converter.testEnforceRangeUnsignedLongLong = -Number.MIN_VALUE |
| PASS converter.testEnforceRangeUnsignedLongLong is 0 |
| PASS converter.testEnforceRangeUnsignedLongLong = Number.MAX_VALUE threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLongLong = -Number.MAX_VALUE threw exception TypeError: Type error. |
| converter.testEnforceRangeUnsignedLongLong = 1.99 |
| PASS converter.testEnforceRangeUnsignedLongLong is 1 |
| PASS converter.testEnforceRangeUnsignedLongLong = -1.99 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLongLong = Infinity threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLongLong = -Infinity threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLongLong = NaN threw exception TypeError: Type error. |
| converter.testEnforceRangeUnsignedLongLong = false |
| PASS converter.testEnforceRangeUnsignedLongLong is 0 |
| converter.testEnforceRangeUnsignedLongLong = true |
| PASS converter.testEnforceRangeUnsignedLongLong is 1 |
| converter.testEnforceRangeUnsignedLongLong = '' |
| PASS converter.testEnforceRangeUnsignedLongLong is 0 |
| converter.testEnforceRangeUnsignedLongLong = '1' |
| PASS converter.testEnforceRangeUnsignedLongLong is 1 |
| PASS converter.testEnforceRangeUnsignedLongLong = 'abc' threw exception TypeError: Type error. |
| converter.testEnforceRangeUnsignedLongLong = null |
| PASS converter.testEnforceRangeUnsignedLongLong is 0 |
| PASS converter.testEnforceRangeUnsignedLongLong = undefined threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeUnsignedLongLong = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom. |
| |
| PASS 'testByte' in converter is true |
| PASS typeof converter.testByte === 'number' is true |
| converter.testByte = 0 |
| PASS converter.testByte is 0 |
| converter.testByte = -1 |
| PASS converter.testByte is -1 |
| converter.testByte = 1 |
| PASS converter.testByte is 1 |
| converter.testByte = 0x7F |
| PASS converter.testByte is 0x7F |
| converter.testByte = 0x80 |
| PASS converter.testByte is -0x80 |
| converter.testByte = -0x7F |
| PASS converter.testByte is -0x7F |
| converter.testByte = -0x80 |
| PASS converter.testByte is -0x80 |
| converter.testByte = -0x81 |
| PASS converter.testByte is 0x7F |
| converter.testByte = Number.MIN_VALUE |
| PASS converter.testByte is 0 |
| converter.testByte = -Number.MIN_VALUE |
| PASS converter.testByte is 0 |
| converter.testByte = Number.MAX_VALUE |
| PASS converter.testByte is 0 |
| converter.testByte = -Number.MAX_VALUE |
| PASS converter.testByte is 0 |
| converter.testByte = 1.99 |
| PASS converter.testByte is 1 |
| converter.testByte = -1.99 |
| PASS converter.testByte is -1 |
| converter.testByte = Infinity |
| PASS converter.testByte is 0 |
| converter.testByte = -Infinity |
| PASS converter.testByte is 0 |
| converter.testByte = NaN |
| PASS converter.testByte is 0 |
| converter.testByte = false |
| PASS converter.testByte is 0 |
| converter.testByte = true |
| PASS converter.testByte is 1 |
| converter.testByte = '' |
| PASS converter.testByte is 0 |
| converter.testByte = '1' |
| PASS converter.testByte is 1 |
| converter.testByte = 'abc' |
| PASS converter.testByte is 0 |
| converter.testByte = null |
| PASS converter.testByte is 0 |
| converter.testByte = undefined |
| PASS converter.testByte is 0 |
| PASS converter.testByte = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom. |
| |
| PASS 'testEnforceRangeByte' in converter is true |
| PASS typeof converter.testEnforceRangeByte === 'number' is true |
| converter.testEnforceRangeByte = 0 |
| PASS converter.testEnforceRangeByte is 0 |
| converter.testEnforceRangeByte = -1 |
| PASS converter.testEnforceRangeByte is -1 |
| converter.testEnforceRangeByte = 1 |
| PASS converter.testEnforceRangeByte is 1 |
| converter.testEnforceRangeByte = 0x7F |
| PASS converter.testEnforceRangeByte is 0x7F |
| PASS converter.testEnforceRangeByte = 0x80 threw exception TypeError: Type error. |
| converter.testEnforceRangeByte = -0x7F |
| PASS converter.testEnforceRangeByte is -0x7F |
| converter.testEnforceRangeByte = -0x80 |
| PASS converter.testEnforceRangeByte is -0x80 |
| PASS converter.testEnforceRangeByte = -0x81 threw exception TypeError: Type error. |
| converter.testEnforceRangeByte = Number.MIN_VALUE |
| PASS converter.testEnforceRangeByte is 0 |
| converter.testEnforceRangeByte = -Number.MIN_VALUE |
| PASS converter.testEnforceRangeByte is 0 |
| PASS converter.testEnforceRangeByte = Number.MAX_VALUE threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeByte = -Number.MAX_VALUE threw exception TypeError: Type error. |
| converter.testEnforceRangeByte = 1.99 |
| PASS converter.testEnforceRangeByte is 1 |
| converter.testEnforceRangeByte = -1.99 |
| PASS converter.testEnforceRangeByte is -1 |
| PASS converter.testEnforceRangeByte = Infinity threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeByte = -Infinity threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeByte = NaN threw exception TypeError: Type error. |
| converter.testEnforceRangeByte = false |
| PASS converter.testEnforceRangeByte is 0 |
| converter.testEnforceRangeByte = true |
| PASS converter.testEnforceRangeByte is 1 |
| converter.testEnforceRangeByte = '' |
| PASS converter.testEnforceRangeByte is 0 |
| converter.testEnforceRangeByte = '1' |
| PASS converter.testEnforceRangeByte is 1 |
| PASS converter.testEnforceRangeByte = 'abc' threw exception TypeError: Type error. |
| converter.testEnforceRangeByte = null |
| PASS converter.testEnforceRangeByte is 0 |
| PASS converter.testEnforceRangeByte = undefined threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeByte = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom. |
| |
| PASS 'testOctet' in converter is true |
| PASS typeof converter.testOctet === 'number' is true |
| converter.testOctet = 0 |
| PASS converter.testOctet is 0 |
| converter.testOctet = -1 |
| PASS converter.testOctet is 0xFF |
| converter.testOctet = 1 |
| PASS converter.testOctet is 1 |
| converter.testOctet = 0x7F |
| PASS converter.testOctet is 0x7F |
| converter.testOctet = 0x80 |
| PASS converter.testOctet is 0x80 |
| converter.testOctet = 0xFF |
| PASS converter.testOctet is 0xFF |
| converter.testOctet = 0x100 |
| PASS converter.testOctet is 0 |
| converter.testOctet = 0x101 |
| PASS converter.testOctet is 1 |
| converter.testOctet = -0x80 |
| PASS converter.testOctet is 0x80 |
| converter.testOctet = -0x81 |
| PASS converter.testOctet is 0x7F |
| converter.testOctet = Number.MAX_VALUE |
| PASS converter.testOctet is 0 |
| converter.testOctet = Number.MIN_VALUE |
| PASS converter.testOctet is 0 |
| converter.testOctet = -Number.MAX_VALUE |
| PASS converter.testOctet is 0 |
| converter.testOctet = -Number.MIN_VALUE |
| PASS converter.testOctet is 0 |
| converter.testOctet = 1.99 |
| PASS converter.testOctet is 1 |
| converter.testOctet = -1.99 |
| PASS converter.testOctet is 0xFF |
| converter.testOctet = Infinity |
| PASS converter.testOctet is 0 |
| converter.testOctet = -Infinity |
| PASS converter.testOctet is 0 |
| converter.testOctet = NaN |
| PASS converter.testOctet is 0 |
| converter.testOctet = false |
| PASS converter.testOctet is 0 |
| converter.testOctet = true |
| PASS converter.testOctet is 1 |
| converter.testOctet = '' |
| PASS converter.testOctet is 0 |
| converter.testOctet = '1' |
| PASS converter.testOctet is 1 |
| converter.testOctet = 'abc' |
| PASS converter.testOctet is 0 |
| converter.testOctet = null |
| PASS converter.testOctet is 0 |
| converter.testOctet = undefined |
| PASS converter.testOctet is 0 |
| PASS converter.testOctet = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom. |
| |
| PASS 'testEnforceRangeOctet' in converter is true |
| PASS typeof converter.testEnforceRangeOctet === 'number' is true |
| converter.testEnforceRangeOctet = 0 |
| PASS converter.testEnforceRangeOctet is 0 |
| PASS converter.testEnforceRangeOctet = -1 threw exception TypeError: Type error. |
| converter.testEnforceRangeOctet = 1 |
| PASS converter.testEnforceRangeOctet is 1 |
| converter.testEnforceRangeOctet = 0x7F |
| PASS converter.testEnforceRangeOctet is 0x7F |
| converter.testEnforceRangeOctet = 0x80 |
| PASS converter.testEnforceRangeOctet is 0x80 |
| converter.testEnforceRangeOctet = 0xFF |
| PASS converter.testEnforceRangeOctet is 0xFF |
| PASS converter.testEnforceRangeOctet = 0x100 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeOctet = 0x101 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeOctet = -0x80 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeOctet = -0x81 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeOctet = Number.MAX_VALUE threw exception TypeError: Type error. |
| converter.testEnforceRangeOctet = Number.MIN_VALUE |
| PASS converter.testEnforceRangeOctet is 0 |
| PASS converter.testEnforceRangeOctet = -Number.MAX_VALUE threw exception TypeError: Type error. |
| converter.testEnforceRangeOctet = -Number.MIN_VALUE |
| PASS converter.testEnforceRangeOctet is 0 |
| converter.testEnforceRangeOctet = 1.99 |
| PASS converter.testEnforceRangeOctet is 1 |
| PASS converter.testEnforceRangeOctet = -1.99 threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeOctet = Infinity threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeOctet = -Infinity threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeOctet = NaN threw exception TypeError: Type error. |
| converter.testEnforceRangeOctet = false |
| PASS converter.testEnforceRangeOctet is 0 |
| converter.testEnforceRangeOctet = true |
| PASS converter.testEnforceRangeOctet is 1 |
| converter.testEnforceRangeOctet = '' |
| PASS converter.testEnforceRangeOctet is 0 |
| converter.testEnforceRangeOctet = '1' |
| PASS converter.testEnforceRangeOctet is 1 |
| PASS converter.testEnforceRangeOctet = 'abc' threw exception TypeError: Type error. |
| converter.testEnforceRangeOctet = null |
| PASS converter.testEnforceRangeOctet is 0 |
| PASS converter.testEnforceRangeOctet = undefined threw exception TypeError: Type error. |
| PASS converter.testEnforceRangeOctet = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom. |
| |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |