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:
John Nunley
2024-03-03 21:54:23 -08:00
parent b3333b47e1
commit 25fab64f6e
8 changed files with 121 additions and 12 deletions

View 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

View 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()
}