From: Feross Aboukhadijeh Date: Wed, 29 Oct 2014 01:39:19 +0000 (-0700) Subject: test style X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=a0024b7c76169cada0b664424d5c45816ba74167;p=buffer.git test style --- diff --git a/perf/copy-big.js b/perf/copy-big.js index 4faac61..96d30d2 100644 --- a/perf/copy-big.js +++ b/perf/copy-big.js @@ -13,14 +13,14 @@ var typedarrayTarget = new Uint8Array(LENGTH) var nodeTarget = new Buffer(LENGTH) suite - .add('BrowserBuffer#copy (' + LENGTH + ')', function () { + .add('BrowserBuffer#copy(' + LENGTH + ')', function () { browserSubject.copy(browserTarget) }) - .add('Uint8Array#copy (' + LENGTH + ')', function () { + .add('Uint8Array#copy(' + LENGTH + ')', function () { typedarrayTarget.set(typedarraySubject, 0) }) if (!process.browser) suite - .add('NodeBuffer#copy (' + LENGTH + ')', function () { + .add('NodeBuffer#copy(' + LENGTH + ')', function () { nodeSubject.copy(nodeTarget) }) diff --git a/perf/copy.js b/perf/copy.js index 20216b8..129121a 100644 --- a/perf/copy.js +++ b/perf/copy.js @@ -13,14 +13,14 @@ var typedarrayTarget = new Uint8Array(LENGTH) var nodeTarget = new Buffer(LENGTH) suite - .add('BrowserBuffer#copy (' + LENGTH + ')', function () { + .add('BrowserBuffer#copy(' + LENGTH + ')', function () { browserSubject.copy(browserTarget) }) - .add('Uint8Array#copy (' + LENGTH + ')', function () { + .add('Uint8Array#copy(' + LENGTH + ')', function () { typedarrayTarget.set(typedarraySubject, 0) }) if (!process.browser) suite - .add('NodeBuffer#copy (' + LENGTH + ')', function () { + .add('NodeBuffer#copy(' + LENGTH + ')', function () { nodeSubject.copy(nodeTarget) }) diff --git a/perf/new-big.js b/perf/new-big.js index b728bf9..b0f84c8 100644 --- a/perf/new-big.js +++ b/perf/new-big.js @@ -5,14 +5,14 @@ var suite = util.suite() var LENGTH = 16000 suite - .add('BrowserBuffer#new (' + LENGTH + ')', function () { + .add('BrowserBuffer#new(' + LENGTH + ')', function () { var buf = new BrowserBuffer(LENGTH) }) - .add('Uint8Array#new (' + LENGTH + ')', function () { + .add('Uint8Array#new(' + LENGTH + ')', function () { var buf = new Uint8Array(LENGTH) }) if (!process.browser) suite - .add('NodeBuffer#new (' + LENGTH + ')', function () { + .add('NodeBuffer#new(' + LENGTH + ')', function () { var buf = new Buffer(LENGTH) }) diff --git a/perf/new.js b/perf/new.js index 5d32868..a35d296 100644 --- a/perf/new.js +++ b/perf/new.js @@ -5,12 +5,12 @@ var suite = util.suite() var LENGTH = 16 suite - .add('BrowserBuffer#new (' + LENGTH + ')', function () { + .add('BrowserBuffer#new(' + LENGTH + ')', function () { var buf = new BrowserBuffer(LENGTH) }) - .add('Uint8Array#new (' + LENGTH + ')', function () { + .add('Uint8Array#new(' + LENGTH + ')', function () { var buf = new Uint8Array(LENGTH) }) - .add('NodeBuffer#new (' + LENGTH + ')', function () { + .add('NodeBuffer#new(' + LENGTH + ')', function () { var buf = new Buffer(LENGTH) })