xr_mode_stop_here!() { /* proc-macro */ }
Expand description
Stop execution (Return) if the test-xr-mode
feature is active. This macro is useful to exit tests early when running
in XR mode. Use this when you can’t predict what every OpenXR implementation will do.
§Example
ⓘ
#[test]
fn my_test() {
test_init_sk!();
// Code that works in both Offscreen and XR modes
// ...
xr_mode_stop_here!(); // Exit here if in XR mode
// Code that should only run in Offscreen mode
// (e.g., pixel-perfect assertions, screenshots)
// ...
}