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

Increase test coverage for generic modules #2806

Merged
merged 4 commits into from
Aug 5, 2023

Conversation

notgull
Copy link
Member

@notgull notgull commented May 14, 2023

  • Tested on all platforms changed
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

This PR adds test cases for the higher-level modules of winit (dpi, event, etc). The goal here is to have 100% test coverage for winit, or at least as high as we can reasonably reach.

image

WIP

@notgull notgull marked this pull request as ready for review July 29, 2023 19:08
@notgull
Copy link
Member Author

notgull commented Jul 29, 2023

Eh, it's about ready now. Baby steps.

Copy link
Member

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

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

I think the clone stuff may be a bit redundant after #2981?

But more tests = yay, so all approved from my side!

src/error.rs Outdated Show resolved Hide resolved
tests/event.rs Outdated Show resolved Hide resolved
@kchibisov
Copy link
Member

Besides that it doesn't build, could we have tests in the file they are testing?

Copy link
Member

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

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

Tests LGTM as well.

Let me know if you want me to fix the Web build, didn't look into why it fails rn.

notgull and others added 4 commits August 4, 2023 17:38
- Rename attr_coverage functions to be more descriptive
- Move tests to the file that they test
- Fix build errors caused by changes to the Event enum

Signed-off-by: John Nunley <[email protected]>
@kchibisov kchibisov merged commit 8a7e18a into rust-windowing:master Aug 5, 2023
@notgull notgull deleted the coverage branch August 5, 2023 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants