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

Reorganize code #55

Merged
merged 7 commits into from
Aug 22, 2019
Merged

Reorganize code #55

merged 7 commits into from
Aug 22, 2019

Conversation

rye
Copy link
Owner

@rye rye commented Aug 22, 2019

Closes #38.

Now, each impl will live in its own module, along with the tests for that impl. As a result, most tests mods will need just a use super::*; to function properly.

Instead of having very long files with lots of indepedent behavior, we
can test the code in the same file it is written, and this proves to be
a much better way of organizing things anyhow.

In effect, each impl for a given trait gets a file, and all of the
pertinent behavior is tested in the same file.  This means that there
should be very few external "use" statements within the tests mod,
except in cases where an impl is expected to use another trait or impl
somewhere.

Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
@rye rye added refactor This Issue or PR primarily involves refactoring tests labels Aug 22, 2019
@rye rye added this to the v1 milestone Aug 22, 2019
@rye rye self-assigned this Aug 22, 2019
@codecov
Copy link

codecov bot commented Aug 22, 2019

Codecov Report

Merging #55 into master will increase coverage by 0.61%.
The diff coverage is 98.4%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #55      +/-   ##
=========================================
+ Coverage   97.78%   98.4%   +0.61%     
=========================================
  Files          10      12       +2     
  Lines         451     125     -326     
=========================================
- Hits          441     123     -318     
+ Misses         10       2       -8
Impacted Files Coverage Δ
src/traits/mask/ipv4addr.rs 100% <100%> (ø)
src/netaddr/from/ipv4addr.rs 100% <100%> (ø)
src/netaddr/from/netv6addr.rs 100% <100%> (ø)
src/netaddr/from/ipv6addr.rs 100% <100%> (ø)
src/traits/mask/ipaddr.rs 100% <100%> (ø)
src/netv4addr/from/ipv4addr.rs 100% <100%> (ø)
src/netaddr/from/netv4addr.rs 100% <100%> (ø)
src/traits/mask/ipv6addr.rs 100% <100%> (ø)
src/netaddr_error/from/addr_parse_error.rs 100% <100%> (ø)
src/netv6addr/from/ipv6addr.rs 100% <100%> (ø)
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ad72b2...b5c0b74. Read the comment docs.

@rye rye merged commit 771265e into master Aug 22, 2019
@rye rye deleted the reorganize-code branch August 22, 2019 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor This Issue or PR primarily involves refactoring tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get rid of src/tests/ subdirectory, reorganize source hierarchy
1 participant