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

Do not encode max length in ROA when it is redundant #143

Merged
merged 6 commits into from
Feb 23, 2024

Conversation

ties
Copy link
Member

@ties ties commented Feb 22, 2024

Do not encode the max length in a ROA when it is present but redundant.

  • I have updated the changelog in README.md

@ties ties requested a review from bjpbakker February 23, 2024 10:05
@ties ties force-pushed the feature/no-redundant-maxlength-in-roa branch from b7b296b to aae17e6 Compare February 23, 2024 10:25
@ties ties force-pushed the feature/no-redundant-maxlength-in-roa branch from aae17e6 to dda0c63 Compare February 23, 2024 10:30
import static org.junit.jupiter.api.Assertions.fail;


public class RoaPrefixTest {
@Test
public void shouldEqualWhenSemanticallyEqual() {
Copy link
Contributor

@lolepezy lolepezy Feb 23, 2024

Choose a reason for hiding this comment

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

Should we have property tests instead of this?
Making sure that equals/hashCode/compare are all coherent with each other is necessary
and there should be a lot of tests, so it makes sense to use property testing here.

Copy link
Member Author

Choose a reason for hiding this comment

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

The logic is quite simple so I do not see the need for many cases. I would want many edge conditions though.

You could model the edge conditions in property based testing and then randomise inputs. But for just testing these contracts I think that these cases show very explicitly that you cover the core.

@ties ties merged commit 1c3f053 into main Feb 23, 2024
6 checks passed
@ties ties deleted the feature/no-redundant-maxlength-in-roa branch February 23, 2024 12:19
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