From 086d98a98a42880a414c13250a0f91ddc4bec2f6 Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Fri, 8 Dec 2023 10:09:24 -0800 Subject: [PATCH] Add a test that `HeadlessRenderer` is object-safe. This will cause a faster failure in the event of changes that make it non-object-safe, rather than only seeing the problem once the build gets to the `test-renderers` crate. --- all-is-cubes/src/camera/renderer.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/all-is-cubes/src/camera/renderer.rs b/all-is-cubes/src/camera/renderer.rs index 7729014cb..3c89a3905 100644 --- a/all-is-cubes/src/camera/renderer.rs +++ b/all-is-cubes/src/camera/renderer.rs @@ -97,3 +97,10 @@ pub fn info_text_drawable( Baseline::Top, ) } + +#[cfg(test)] +mod tests { + use super::*; + + fn _headless_renderer_is_object_safe(_: &dyn HeadlessRenderer) {} +}