From 33c86c80e74e7ecbdc0d4c5f875145e5772e964b Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Tue, 16 Jan 2024 09:02:22 -0800 Subject: [PATCH] mutants: More skips/excludes --- .cargo/mutants.toml | 7 +++++-- all-is-cubes/src/drawing.rs | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.cargo/mutants.toml b/.cargo/mutants.toml index 997adc36d..36908a4b1 100644 --- a/.cargo/mutants.toml +++ b/.cargo/mutants.toml @@ -2,10 +2,13 @@ exclude_globs = [ "tests.rs", - "all-is-cubes/src/content/**",# TODO: maybe un-exclude content once we are out of more important things (it's hard to test thoroughly) + "all-is-cubes/src/content/**", # TODO: maybe un-exclude content once we are out of more important things (it's hard to test thoroughly) + "all-is-cubes/src/raytracer/renderer.rs", # test coverage for this is in the separate test-renderers package ] exclude_re = [ - "::fmt ->", # easy to break, hard to test completely + "::fmt\\b", # easy to break, hard to test completely + "::wireframe_points", # debug visualization, largely not tested + "::consistency_check\\b", # is a form of test-assertion itself "::alive", # mutating this to true can only cause leaks diff --git a/all-is-cubes/src/drawing.rs b/all-is-cubes/src/drawing.rs index 9f8346bd4..18daed8ed 100644 --- a/all-is-cubes/src/drawing.rs +++ b/all-is-cubes/src/drawing.rs @@ -495,6 +495,7 @@ impl<'a> VoxelColor<'a> for &'a VoxelBrush<'a> { impl<'a> From<&'a VoxelBrush<'a>> for SpaceTransaction { /// Converts the brush into an equivalent transaction, as by /// [`VoxelBrush::paint_transaction`] at the origin. + #[mutants::skip] fn from(brush: &'a VoxelBrush<'a>) -> Self { brush.paint_transaction(Cube::ORIGIN) } @@ -502,6 +503,7 @@ impl<'a> From<&'a VoxelBrush<'a>> for SpaceTransaction { impl<'a> From> for SpaceTransaction { /// Converts the brush into an equivalent transaction, as by /// [`VoxelBrush::paint_transaction`] at the origin. + #[mutants::skip] fn from(brush: VoxelBrush<'a>) -> Self { SpaceTransaction::from(&brush) }