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

Improves UTs coverage in shared/aggregation #8593

Merged
merged 2 commits into from
Mar 11, 2021

Conversation

farazdagi
Copy link
Contributor

What type of PR is this?

Other / UTs improval

What does this PR do? Why is it needed?

  • Unused code is removed
  • All important paths are tested (improving coverage from 80% -> 95%+)

Which issues(s) does this PR fix?

N/A

Other notes for review

@farazdagi farazdagi self-assigned this Mar 11, 2021
Comment on lines -82 to -86
if !allowOverlaps && solution.Coverage.Overlaps(*candidate.bits) {
// Overlapping candidates violate non-intersection invariant.
candidate.processed = true
continue
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This code is redundant, as above (on line 74), we filter out overlapping candidates in:

// Score candidates against remaining bits.
// ***Filter out processed and overlapping (when disallowed).***
// Sort by score in a descending order.
mc.Candidates.score(remainingBits).filter(solution.Coverage, allowOverlaps).sort()

@farazdagi farazdagi marked this pull request as ready for review March 11, 2021 14:13
@farazdagi farazdagi requested a review from a team as a code owner March 11, 2021 14:13
@prylabs-bulldozer prylabs-bulldozer bot merged commit 55b6134 into develop Mar 11, 2021
@delete-merged-branch delete-merged-branch bot deleted the impr-uts-shared-aggregation branch March 11, 2021 15:01
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.

2 participants