mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-24 10:46:50 -06:00
* CI: dev builds keep line tables only * CI: one integration-test binary per crate * CI: xtask runs tests with nextest, doctests apart, --keep-going on clippy and wasm cargo xtask test runs the workspace tests (--lib --bins --tests) with cargo-nextest when it is installed, else cargo test, then the doctests. cargo xtask ci uses the same two steps. * CI: docs name cargo xtask test * CI: agent guides name the moved fuzz test * CI: tests added on main join their crate's test binary
11 lines
344 B
Rust
11 lines
344 B
Rust
use gridcraft_engine::core::date::unix_now_ms;
|
|
|
|
#[test]
|
|
fn ui_clock_returns_current_unix_milliseconds() {
|
|
let before = unix_now_ms().unwrap();
|
|
let now = gridcraft_ui_egui::now_ms();
|
|
let after = unix_now_ms().unwrap();
|
|
assert!(now.is_finite() && now > 0.0);
|
|
assert!((before.min(after)..=before.max(after)).contains(&now));
|
|
}
|