summaryrefslogtreecommitdiffstats
path: root/tests/version.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-01 19:58:59 +0100
committersalmonik <salmonik@tuta.io>2026-11-01 19:58:59 +0100
commit10ff558853f549d3f3c7c8432488bfad9da6973a (patch)
tree271b05fead384e2d91e5c8332fea9d00b540f0cc /tests/version.rs
parentv4.0.7: finish the Phase 1 boundary with a command shell (diff)
downloadzagan-bet-10ff558853f549d3f3c7c8432488bfad9da6973a.tar.gz
zagan-bet-10ff558853f549d3f3c7c8432488bfad9da6973a.zip
v4.1.0: add the egui workspace member and the roulette style spike
Phase 3 of the GUI plan. gui/ is a separate package that depends on the core with default features off, so egui never enters the TUI or server build graph. It carries the theme tokens and two embedded fonts (Open Sans OFL, Hack MIT), paints the felt, chips, cursor and wheel from RouletteView, and composes the persistent header with the betting sidebar. The reference screen runs on demo state: arrow keys move the shared Cursor, clicks place chips, and SPIN animates a 2.4 s wheel that settles with the winning pocket under the pointer. No network until Phase 4. Verified x86_64-pc-windows-gnu cross-compile. Measured on Linux at 1080p with llvmpipe: 6.0 MB binary (4.7 MB on Windows), 52 ms to window, 137 MB idle RSS, 0% idle CPU.
Diffstat (limited to 'tests/version.rs')
-rw-r--r--tests/version.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/version.rs b/tests/version.rs
index ef58601..af244db 100644
--- a/tests/version.rs
+++ b/tests/version.rs
@@ -69,3 +69,30 @@ fn the_hello_reply_round_trips() {
69 assert!(parse_hello("PONG").is_none()); 69 assert!(parse_hello("PONG").is_none());
70 assert!(parse_hello("HELLO").is_none()); 70 assert!(parse_hello("HELLO").is_none());
71} 71}
72
73/// The GUI is a client, so it must ship in lockstep with the TUI and server.
74/// Keep `gui/Cargo.toml` at the same version as the root package.
75#[test]
76fn the_gui_member_uses_the_same_version() {
77 let gui_manifest = include_str!("../gui/Cargo.toml");
78 let gui_version = gui_manifest
79 .lines()
80 .find_map(|line| line.trim().strip_prefix("version = "))
81 .expect("gui/Cargo.toml declares a version")
82 .trim_matches('"');
83 assert_eq!(gui_version, VERSION);
84}
85
86/// egui's dependency tree must never enter the TUI or server build graph.
87/// The GUI is a workspace member that depends on this package, never the
88/// other way round.
89#[test]
90fn the_root_package_does_not_depend_on_the_gui() {
91 let manifest = include_str!("../Cargo.toml");
92 for forbidden in ["eframe", "egui"] {
93 assert!(
94 !manifest.contains(forbidden),
95 "the root package must not depend on {forbidden}"
96 );
97 }
98}