0.3.0-0-pre.5
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/apps/game-snake-poc-wasm/unit_tests/runtime.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
#[test]
|
||||
fn direction_is_queued_without_advancing_simulation() {
|
||||
@@ -25,3 +25,28 @@ fn scene_and_status_are_exposed_for_canvas_host() {
|
||||
assert_eq!(game.rectangle_x(99), -1.0);
|
||||
assert_eq!(game.rectangle_y(99), -1.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn browser_runtime_provenance_preserves_static_and_observed_dimensions() {
|
||||
let mut game = crate::SnakeWasmGame::new();
|
||||
assert_eq!(game.provenance_platform_family(), "web");
|
||||
assert_eq!(game.provenance_execution_model(), "wasm");
|
||||
assert_eq!(game.provenance_runtime_host(), "browser");
|
||||
assert_eq!(game.provenance_device_class(), "unknown");
|
||||
assert_eq!(game.provenance_input_profile(), "unknown");
|
||||
assert!(game.configure_runtime_provenance("phone", "touch"));
|
||||
assert_eq!(game.provenance_device_class(), "phone");
|
||||
assert_eq!(game.provenance_input_profile(), "touch");
|
||||
assert_eq!(game.provenance_platform_family(), "web");
|
||||
assert_eq!(game.provenance_execution_model(), "wasm");
|
||||
assert_eq!(game.provenance_runtime_host(), "browser");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn invalid_runtime_provenance_labels_are_rejected_without_mutation() {
|
||||
let mut game = crate::SnakeWasmGame::new();
|
||||
assert!(game.configure_runtime_provenance("desktop", "keyboard-mouse"));
|
||||
assert!(!game.configure_runtime_provenance("console", "telepathy"));
|
||||
assert_eq!(game.provenance_device_class(), "desktop");
|
||||
assert_eq!(game.provenance_input_profile(), "keyboard-mouse");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user