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

Add/Update tests #10

Merged
merged 10 commits into from
Jan 12, 2022
Merged

Add/Update tests #10

merged 10 commits into from
Jan 12, 2022

Conversation

nodech
Copy link
Member

@nodech nodech commented Dec 25, 2021

  • Add and expose ZERO_IPV4, existing ZERO_IP is IPv6 zero(::).
  • Add alias ZERO_IPV6 for ZERO_IP.
  • Fix getReachability bugs.
  • Add several test vectors.
  • Port inet tests from c-ares.

@coveralls
Copy link

coveralls commented Dec 25, 2021

Pull Request Test Coverage Report for Build 1678084013

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 11 of 11 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+29.8%) to 74.713%

Totals Coverage Status
Change from base Build 1622316327: 29.8%
Covered Lines: 907
Relevant Lines: 1229

💛 - Coveralls

 - RFC 1918
 - RFC 2544
 - RFC 3927
 - RFC 6598
 - RFC 5737
 - RFC 3849
 - isValid
 - isNull
 - isBroadcast
  - RFC 3964
  - RFC 6052
  - RFC 4380
  - RFC 4862
  - RFC 4193
  - RFC 6145
  - RFC 4843
  - RFC 7343
  - IPv4
  - IPv6
  - isLocal
  - isMulticast
  - isValid
  - isRoutable
  - isOnion
  - getNetwork
ip: minor fix to 16 byte ipv4 writer.
pkg: add bufio as a dev dependency for testing.
test: add tests for binet.read/binet.write and
binet.readBR/binet.writeBW
lib/ip.js Show resolved Hide resolved
@pinheadmz
Copy link
Member

pinheadmz commented Jan 4, 2022

Also confirmed the test vectors match c-ares, which is awesome (including "no room no room" -- what?!)

This LGTM, I'm not sure how else to review without checking all the RFCs, do you have any recommendation on how to understand all this?

Update: ran hsd for a while with this branch of binet installed, no issues... is there anything to look for?

lib/ip.js Show resolved Hide resolved
@nodech nodech marked this pull request as ready for review January 10, 2022 17:44
@nodech nodech merged commit acec548 into bcoin-org:master Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants