pub struct MutationPlan {
pub files: Vec<PlannedFile>,
pub mutants: Vec<PlannedMutant>,
pub test_files: Vec<String>,
pub reach_files: Vec<String>,
pub test_file_reach: BTreeMap<String, Vec<u32>>,
pub support_files: Vec<String>,
pub counts: MutationPlanCounts,
pub no_test_files: bool,
pub framework_config_checked: bool,
pub skipped_files: Vec<SkippedFile>,
pub unmatched_paths: Vec<String>,
}Expand description
The static mutation plan.
Fields§
§files: Vec<PlannedFile>The files with a planned or pending mutant, sorted by path.
mutants: Vec<PlannedMutant>Each mutant. Ranked mutants come first in rank order, then the other mutants by file, span and id.
test_files: Vec<String>The union of the static test files of files, sorted.
reach_files: Vec<String>The files that the test files reach through static imports, sorted.
MutationPlan::test_file_reach indexes into this list.
test_file_reach: BTreeMap<String, Vec<u32>>The files that each test file of test_files reaches through static
imports, as sorted indices into reach_files. The list leaves out the
test file itself and ignores vi.mock, so it is a superset of the
files that the test loads. The result cache of a run keys on the
content of these files.
support_files: Vec<String>The setup files of the test runner, the runner config modules at the
root (RUNNER_CONFIG_MODULES), and the files that they reach through
static imports, sorted. Each test loads them, so the result cache keys
on their content for each mutant.
counts: MutationPlanCountsThe number of mutants for each disposition.
no_test_files: boolTrue when the project has no test files. Each mutant is then
no-coverage, and a report shows this one fact instead of one line
for each mutant.
framework_config_checked: boolTrue when the plan applied the framework-config prune rule. False
when the caller gave no framework config exports, so that a mutant in
such an export can be planned.
skipped_files: Vec<SkippedFile>The selected files that the plan did not instrument, sorted by path.
unmatched_paths: Vec<String>The paths of a Paths scope that select no source file, as given and
with forward slashes, sorted. A path can select no file because it
does not exist, or because it names only test code, declaration files
or files outside the module graph.
Implementations§
Source§impl MutationPlan
impl MutationPlan
Sourcepub fn test_file_reach_paths<'a>(
&'a self,
test_file: &str,
) -> impl Iterator<Item = &'a str>
pub fn test_file_reach_paths<'a>( &'a self, test_file: &str, ) -> impl Iterator<Item = &'a str>
The files that test_file reaches through static imports, sorted.
Empty for a file that is not a test file of the plan.
Trait Implementations§
Source§impl Clone for MutationPlan
impl Clone for MutationPlan
Source§impl Debug for MutationPlan
impl Debug for MutationPlan
impl Eq for MutationPlan
Source§impl PartialEq for MutationPlan
impl PartialEq for MutationPlan
Source§impl Serialize for MutationPlan
impl Serialize for MutationPlan
impl StructuralPartialEq for MutationPlan
Auto Trait Implementations§
impl Freeze for MutationPlan
impl RefUnwindSafe for MutationPlan
impl Send for MutationPlan
impl Sync for MutationPlan
impl Unpin for MutationPlan
impl UnsafeUnpin for MutationPlan
impl UnwindSafe for MutationPlan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more