-
Notifications
You must be signed in to change notification settings - Fork 30k
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
test: basic functionality of readUIntBE() #10417
Conversation
@nodejs/buffer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Based on review of coverage.nodejs.org, this test increases the test coverage in lib/buffer.js
. (@larissayvette: You might want to mention that in your PR descriptions when opening these. No big deal if you don't, but probably better if you do.)
assert.throws( | ||
() => { | ||
buf.readUIntBE(5); | ||
}, RangeError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should follow the same recommendations @jasnell did here: #10359 (review) to maintain consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@julianduque Can you be a bit more specific? To me, this seems OK if it's indented two spaces, which it seems to be here.
Are you saying the arrow function should be all on one line?
Or are you saying that the arrow function should start one line above, right after the parenthesis?
Or something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see! Thanks.
5f8df9e
to
0cb3553
Compare
0cb3553
to
83e79cf
Compare
Landed in a5103ce Thanks! |
PR-URL: #10417 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Julian Duque <julianduquej@gmail.com>
PR-URL: #10417 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Julian Duque <julianduquej@gmail.com>
PR-URL: #10417 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Julian Duque <julianduquej@gmail.com>
PR-URL: #10417 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Julian Duque <julianduquej@gmail.com>
this test is failing on v4.x
|
It looks like the test is failing because the error on v4.x contains the string "index" while it is "Index" on current master. As it turns out, a later PR removes this test anyway, so I'll label this and the other one as "do not land on v4.x". |
PR-URL: #10417 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Julian Duque <julianduquej@gmail.com>
PR-URL: #10417 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Julian Duque <julianduquej@gmail.com>
Checklist
Affected core subsystem(s)
test
Description of change
Testing readUIntBE() when noAssert is true and false