test, bechmark: use new Buffer API where appropriate#18980
test, bechmark: use new Buffer API where appropriate#18980ChALkeR wants to merge 1 commit intonodejs:masterfrom
Conversation
There was a problem hiding this comment.
Maybe write this as "Tests the deprecated Buffer() constructor"
If you don't change it, "on a purpose" should be "on purpose"
There was a problem hiding this comment.
Technically, the first line of those two (Buffer(100)) is not a constructor call by itself, it's the commit description which is a bit inaccurate there (but rewording will make it needlessly longer).
I will fix the language though, thanks!
For tests / benchmarks that are creating Buffer instances for any reason other than to test Buffer constructor, use the new Buffer.alloc/Buffer.from API instead of the deprecated API.
be71228 to
bc15526
Compare
BridgeAR
left a comment
There was a problem hiding this comment.
LGTM. We might actually introduce a linting rule so it does not sneak back in at some point.
|
CI https://ci.nodejs.org/job/node-test-pull-request/13428/ @ChALkeR please always start a CI after opening a PR :-) |
|
Landed in 8ed44ff |
For tests / benchmarks that are creating Buffer instances for any reason other than to test Buffer constructor, use the new Buffer.alloc/Buffer.from API instead of the deprecated API. PR-URL: #18980 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
For tests / benchmarks that are creating Buffer instances for any reason other than to test Buffer constructor, use the new Buffer.alloc/Buffer.from API instead of the deprecated API. PR-URL: nodejs#18980 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
For tests / benchmarks that are creating Buffer instances for any reason other than to test Buffer constructor, use the new Buffer.alloc/Buffer.from API instead of the deprecated API. PR-URL: nodejs#18980 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
|
If this needs to be backported to 8.x, a separate backport PR will be necessary. |
For tests / benchmarks that are creating Buffer instances for any reason other than to test Buffer constructor, use the new
Buffer.alloc/Buffer.fromAPI instead of the deprecated API.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test, benchmark