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

test: add test for dgram.setTTL #2121

Merged
merged 1 commit into from Jul 10, 2015
Merged

Conversation

evanlucas
Copy link
Contributor

Verify that passing a non-number will throw and that the argument is
returned on success.

There currently is not a test to verify this functionality.

@evanlucas evanlucas added the test Issues and PRs related to the tests. label Jul 7, 2015
@cjihrig
Copy link
Contributor

cjihrig commented Jul 7, 2015

LGTM

@evanlucas
Copy link
Contributor Author

@mscdex mscdex added the dgram Issues and PRs related to the dgram subsystem / UDP. label Jul 7, 2015
@evanlucas
Copy link
Contributor Author

The CI failures so far seem unrelated.

socket.bind(common.PORT);
socket.on('listening', function() {
var result = socket.setTTL(16);
assert.equal(result, 16);
Copy link
Member

Choose a reason for hiding this comment

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

nit: could be assert.strictEqual(socket.setTTL(16), 16); Or if that's less readable, another const. :)

Also, isn't it better to use strictEqual for this kind of stuff?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point

Verify that passing a non-number will throw and that the argument is
returned on success.

PR-URL: nodejs#2121
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@evanlucas evanlucas closed this Jul 10, 2015
@evanlucas evanlucas deleted the dgram-tests branch July 10, 2015 04:27
@evanlucas evanlucas merged commit 842eb5b into nodejs:master Jul 10, 2015
@evanlucas
Copy link
Contributor Author

Landed in 842eb5b. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dgram Issues and PRs related to the dgram subsystem / UDP. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants