Skip to main content

root_cause_groups

Function root_cause_groups 

Source
pub(super) fn root_cause_groups(claims: &[Option<&str>]) -> Vec<usize>
Expand description

Returns a group number for the claim of each failing test: tests with the same number have one root cause. Two tagged claims agree by their tags. Otherwise the word matcher compares the claims, also when only one of them has a tag. Groups use complete linkage: in claim order, a test joins the first group whose every test agrees with it, else starts a group numbered by its index. A chain of agreeing pairs, such as a bare Vault.sol between two Vault.sol files or lines that step across the line window, does not link two tests, so it cannot inflate the quorum. A test without a claim, or whose claim names no Solidity file, agrees with no other test.