mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-30 13:20:06 -04:00
it: Add runner and common tests
Still needs some work, but the idea should be clear. Signed-off-by: John Nunley <dev@notgull.net>
This commit is contained in:
12
it/common-tests/Cargo.toml
Normal file
12
it/common-tests/Cargo.toml
Normal file
@@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "common-tests"
|
||||
version = "0.1.0"
|
||||
rust-version.workspace = true
|
||||
repository.workspace = true
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
gui-test.workspace = true
|
||||
macro_rules_attribute = "0.2.0"
|
||||
winit.workspace = true
|
||||
21
it/common-tests/src/main.rs
Normal file
21
it/common-tests/src/main.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
//! Run the test.
|
||||
|
||||
use gui_test::{test, Harness};
|
||||
use macro_rules_attribute::apply;
|
||||
|
||||
use winit::event_loop::EventLoop;
|
||||
|
||||
#[apply(test)]
|
||||
fn initialize(harness: &mut Harness) {
|
||||
let _test = harness.test("startup/shutdown");
|
||||
|
||||
let evl = EventLoop::new().unwrap();
|
||||
evl.run(|_event, elwt| {
|
||||
elwt.exit();
|
||||
})
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
gui_test::main! {
|
||||
gui_test::remote::handler()
|
||||
}
|
||||
Reference in New Issue
Block a user