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

Port Project Keter's test runner to this project #3

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

notgull
Copy link
Member

@notgull notgull commented Jan 8, 2024

As discussed in chat, ports the test framework I wrote for testing Project Keter to winit. Hopefully useful for making sure everything works in CI.

Not really CI-ready yet. I need to upload all of the Docker images first.

Signed-off-by: John Nunley <[email protected]>
Signed-off-by: John Nunley <[email protected]>
Signed-off-by: John Nunley <[email protected]>
Signed-off-by: John Nunley <[email protected]>
Copy link
Member

@kchibisov kchibisov left a comment

Choose a reason for hiding this comment

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

I haven't looked into how it actually works, but in general, you shouldn't touch winit-core. You should test the winit stuff, the core is irrelevant?

It'll also be nice to have some sort of CI for stuff like that to actually see how it could be used and what we can achieve with that.

Given that it doesn't interact with the winit stuff itself yet it could leave on this branch for now unless we have it actually wired with real tests on platforms supporting that, if it's fine with you.

Comment on lines +3 to +12
use futures_lite::future::block_on;

#[allow(clippy::eq_op)]
fn main() {
winit_test::run_tests(|harness| {
block_on(async move {
harness.test("hello world", async {
assert_eq!(1 + 1, 2)
}).await;
});
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need any tests here? This doesn't have any core logic stuff it should all go into the winit crate instead.

@daxpedda
Copy link
Member

daxpedda commented Jan 12, 2024

Is this capable of running integration tests on Winit? E.g. resizing a window and checking if the correct events are fired?

@notgull
Copy link
Member Author

notgull commented Jan 12, 2024

Not yet; it's just a test runner for now

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.

3 participants