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

Adjust assertion of max_error_length test #480

Merged
merged 2 commits into from Oct 31, 2022

Conversation

angatha
Copy link
Collaborator

@angatha angatha commented Oct 30, 2022

Some message parts may be hidden from the assertion because of multiple splitting. See #473 and thisfor context.

@jacadzaca
Copy link
Collaborator

Good catch :)

@jacadzaca jacadzaca self-requested a review October 30, 2022 08:38
Copy link
Collaborator

@jacadzaca jacadzaca left a comment

Choose a reason for hiding this comment

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

@angatha could you provide an example file ics with a ': ' and add it to the parameter list? e.g:

BEGIN:VCALENDAR
BEGIN:VEVENT
SUMMARY:Example calendar with a ': ' in the summary
END:VEVENT
BEGIN:VEVENT
SUMMARY:Another event with a ': ' in the summary
END:VEVENT
[...]
END:VCALENDAR

@angatha
Copy link
Collaborator Author

angatha commented Oct 30, 2022

I can do that. The one that you provided, is a good reference, but I'm missing the advantage of that.

Assuming the state of #473, that test would succeed. And assuming the state before #473, where long messages where generated, that test will still pass, since the error is in the test itself.

The fact, that the test succeeds, indicates the bug inside the test but no one will notice this since all tests passed.

@jacadzaca jacadzaca self-requested a review October 30, 2022 09:37
@jacadzaca
Copy link
Collaborator

Oh, you're right.

@angatha
Copy link
Collaborator Author

angatha commented Oct 30, 2022

But it doesn't hurt :)

@coveralls
Copy link

coveralls commented Oct 30, 2022

Pull Request Test Coverage Report for Build 3354951542

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.04%

Totals Coverage Status
Change from base Build 3354567871: 0.0%
Covered Lines: 1163
Relevant Lines: 1250

💛 - Coveralls

@jacadzaca
Copy link
Collaborator

maybe we should assert that the message is split as we think in the test? or would that be testing tests esentialy?

@niccokunzmann
Copy link
Member

Tests are different from contracts or verifications or proofs of programs. They are a heuristic. If they fail, something is wrong if they don't, we do not know. I think, we are hitting that here.

@niccokunzmann
Copy link
Member

It looks good to me merging.

@niccokunzmann niccokunzmann merged commit 4b9df78 into master Oct 31, 2022
@niccokunzmann niccokunzmann added the hacktoberfest Issues for participation in the hacktoberfest https://hacktoberfest.com/ label Oct 31, 2022
@niccokunzmann niccokunzmann deleted the adjust_assertion_in_max_error_length branch November 2, 2022 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues for participation in the hacktoberfest https://hacktoberfest.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants