Skip to content

Commit

Permalink
mutants: More skips/excludes
Browse files Browse the repository at this point in the history
  • Loading branch information
kpreid committed Jan 16, 2024
1 parent a4da419 commit 33c86c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .cargo/mutants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
"<impl Error for ", # easy to break, hard to test completely
"<impl Arbitrary for ", # near-impossible to test
"<impl Listener for .*>::alive", # mutating this to true can only cause leaks
Expand Down
2 changes: 2 additions & 0 deletions all-is-cubes/src/drawing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,13 +495,15 @@ 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)
}
}
impl<'a> From<VoxelBrush<'a>> 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)
}
Expand Down

0 comments on commit 33c86c8

Please sign in to comment.