-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
[FEATURE REQUEST] Add basic testing infrastructure and documentation #951
Comments
cc @jf2048 as you wanted the test_synced to be public as well |
I am not sure what would be needed other than making that function available + some examples. I wonder if the |
Yes, it seems like that needs to be public (or it needs to be copied) if someone wants unit tests for any gtk widgets, or for gtk4-macros, libadwaita-rs, libshumate-rs, libpanel-rs, sourceview5-rs, etc. Seeing a gtk4-test would also be good and probably not too hard. Perhaps it should be made into a macro that calls #[gtk::test]
fn mytest() {
// ...
} And would also allow supporting async tests similar to #[tokio::test]. |
This issue is still a problem though: #811 Although maybe it's not that bad in practice since the tests all run synchronously anyway? |
There should be some testing infrastructure for gtk4-rs apps and internal code that's reusable and documented.
At least something as a convenient entry point for running tests that rely on GTK (something similar to https://github.com/gtk-rs/gtk4-rs/blob/master/gtk4/src/lib.rs#L62).
I've seen gtk-rs/gtk-test#47 and to be honest, I don't have a lot of resources currently, too, but I hope we can at least work together to enable some basic functionality for the upcoming release.
The text was updated successfully, but these errors were encountered: