Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to test-buffer-slice from NINA code & learn #10048

Closed
wants to merge 2 commits into from
Closed

Improvements to test-buffer-slice from NINA code & learn #10048

wants to merge 2 commits into from

Conversation

mgalexander
Copy link

@mgalexander mgalexander commented Dec 1, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

Michael Alexander added 2 commits December 1, 2016 11:42
- change implicit string equal() compares to strictEqual compares of
buffer output (the slice output default)
- explicitly create buffers from utf8 inputs for the compare
-
- change implicit string equal() compares to strictEqual compares of
buffer output (the slice output default)
- explicitly create buffers from utf8 inputs for the compare
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@imyller imyller added code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. buffer Issues and PRs related to the buffer subsystem. labels Dec 1, 2016
@Trott
Copy link
Member

Trott commented Dec 5, 2016

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

assert.strictEqual(0, Buffer.from('hello').slice(0, 0).length);
assert.strictEqual(0, Buffer('hello').slice(0, 0).length);
assert.strictEqual(0, Buffer.from('hello', 'utf8').slice(0, 0).length);
assert.strictEqual(0, Buffer('hello', 'utf8').slice(0, 0).length);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: adding 'utf8' to these is unnecessary since that is the default already.

jasnell pushed a commit that referenced this pull request Dec 5, 2016
* change implicit string equal() compares to strictEqual compares of
  buffer output (the slice output default)
* explicitly create buffers from utf8 inputs for the compare

PR-URL: #10048
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell
Copy link
Member

jasnell commented Dec 5, 2016

Landedin 02a4c08. thank you for the PR and for participating in the code-and-learn!

@jasnell jasnell closed this Dec 5, 2016
Fishrock123 pushed a commit that referenced this pull request Dec 6, 2016
* change implicit string equal() compares to strictEqual compares of
  buffer output (the slice output default)
* explicitly create buffers from utf8 inputs for the compare

PR-URL: #10048
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax pushed a commit to addaleax/node that referenced this pull request Dec 8, 2016
* change implicit string equal() compares to strictEqual compares of
  buffer output (the slice output default)
* explicitly create buffers from utf8 inputs for the compare

PR-URL: nodejs#10048
Reviewed-By: James M Snell <jasnell@gmail.com>
jmdarling pushed a commit to jmdarling/node that referenced this pull request Dec 8, 2016
* change implicit string equal() compares to strictEqual compares of
  buffer output (the slice output default)
* explicitly create buffers from utf8 inputs for the compare

PR-URL: nodejs#10048
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
* change implicit string equal() compares to strictEqual compares of
  buffer output (the slice output default)
* explicitly create buffers from utf8 inputs for the compare

PR-URL: #10048
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants