fixed coverage issue

This commit is contained in:
Fabian Vogelsteller 2015-06-19 13:28:59 +02:00
parent d51e9a2f30
commit 0e3b29c7c2
2 changed files with 2 additions and 1 deletions

View File

@ -213,7 +213,7 @@ var fromDecimal = function (value) {
* @return {String}
*/
var toHex = function (val) {
/*jshint maxcomplexity:7 */
/*jshint maxcomplexity: 8 */
if (isBoolean(val))
return fromDecimal(+val);

View File

@ -14,6 +14,7 @@ var tests = [
{ value: '-0x1', expected: '-0x1'},
{ value: '-15', expected: '-0xf'},
{ value: '-0xf', expected: '-0xf'},
{ value: '0x657468657265756d', expected: '0x657468657265756d'},
{ value: '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd', expected: '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd'},
{ value: '-0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', expected: '-0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'},
{ value: '-0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd', expected: '-0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd'},