Skip to content

Commit

Permalink
Add a test that HeadlessRenderer is object-safe.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kpreid committed Dec 8, 2023
1 parent ec368d0 commit 086d98a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions all-is-cubes/src/camera/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,10 @@ pub fn info_text_drawable<C: PixelColor + 'static>(
Baseline::Top,
)
}

#[cfg(test)]
mod tests {
use super::*;

fn _headless_renderer_is_object_safe(_: &dyn HeadlessRenderer) {}
}

0 comments on commit 086d98a

Please sign in to comment.