Skip to content

Commit b6d6a6d

Browse files
😒 chore(benchmark): Fix toString runs.
1 parent 73c9492 commit b6d6a6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_benchmark/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ const fns = {
240240
from10: s => SilentMattBigInteger.parse(s, 10),
241241
from16: s => SilentMattBigInteger.parse(s, 16),
242242
to10: x => x.toString(10),
243-
to16: x => x.toString(16),
243+
to16: x => x.toString(16).toLowerCase(),
244244
add: (a,b) => a.add(b),
245245
sub: (a,b) => a.subtract(b),
246246
mul: (a,b) => a.multiply(b),
@@ -420,7 +420,7 @@ for ( let i = 0; i < NFIXTURES; ++i ) {
420420
results[i][key] = results[i][key] || {} ;
421421

422422
const result = fixture.outs[key] ;
423-
const str = result instanceof String ? result : fn.to16(result).toLowerCase() ;
423+
const str = result.constructor.prototype === String.prototype ? result : fn.to16(result).toLowerCase() ;
424424
results[i][key][name] = str;
425425
}) ;
426426
} ) ;

0 commit comments

Comments
 (0)