Fix unit tests for all base conversion functions
This include cases were artificial constraints were not checked
(eg: between -512 and 511 for `DECBIN`) and some bugs were 32
bits platform were assumed.
The following are covered:
`BIN2DEC`, `BIN2HEX`, `BIN2OCT`,
`DEC2BIN`, `DEC2HEX`, `DEC2OCT`,
`HEX2BIN`, `HEX2DEC`, `HEX2OCT`,
`OCT2BIN`, `OCT2DEC`, `OCT2HEX`
2016-07-31 17:42:58 +00:00
|
|
|
"FF", "11111111"
|
|
|
|
"1FF", "111111111"
|
|
|
|
"200", "#NUM!"
|
|
|
|
"FFFFFFFE00", "1000000000" // 2's Complement
|
|
|
|
"FFFFFFFDFF", "#NUM!" // 2's Complement
|
2012-03-23 18:04:58 +00:00
|
|
|
"01AB", "110101011"
|
|
|
|
"ABCD", "#NUM!"
|
|
|
|
"F6", "11110110"
|
|
|
|
"F", 8, "00001111"
|
|
|
|
"B7", "10110111"
|
|
|
|
"12345", "#NUM!"
|
|
|
|
"123456789", "#NUM!"
|
|
|
|
"123.45", "#NUM!"
|
|
|
|
"0", "0"
|
|
|
|
"G3579A", "#NUM!"
|
|
|
|
TRUE, "#VALUE!"
|
Fix unit tests for all base conversion functions
This include cases were artificial constraints were not checked
(eg: between -512 and 511 for `DECBIN`) and some bugs were 32
bits platform were assumed.
The following are covered:
`BIN2DEC`, `BIN2HEX`, `BIN2OCT`,
`DEC2BIN`, `DEC2HEX`, `DEC2OCT`,
`HEX2BIN`, `HEX2DEC`, `HEX2OCT`,
`OCT2BIN`, `OCT2DEC`, `OCT2HEX`
2016-07-31 17:42:58 +00:00
|
|
|
"-107", "#NUM!"
|