Skip to content

Commit 2686009

Browse files
authored
Merge pull request #4593 from ASuciuX/feat/track-mutants-clarity-contains-key
Track functions using mutants from PR #4483
2 parents d0df9d1 + 9d36bce commit 2686009

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clarity/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ stacks_common = { package = "stacks-common", path = "../stacks-common" }
3131
rstest = "0.17.0"
3232
rstest_reuse = "0.5.0"
3333
hashbrown = { workspace = true }
34+
mutants = "0.0.3"
3435

3536
[dependencies.serde_json]
3637
version = "1.0"

clarity/src/vm/ast/traits_resolver/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ impl TraitsResolver {
4545
TraitsResolver {}
4646
}
4747

48+
#[cfg_attr(test, mutants::skip)]
4849
pub fn run(&mut self, contract_ast: &mut ContractAST) -> ParseResult<()> {
4950
let mut referenced_traits = HashMap::new();
5051

clarity/src/vm/costs/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,9 @@ impl TrackerData {
786786
/// `apply_updates` - tells this function to look for any changes in the cost voting contract
787787
/// which would need to be applied. if `false`, just load the last computed cost state in this
788788
/// fork.
789+
/// TODO: #4587 add test for Err cases
790+
/// Or keep the skip and remove the comment
791+
#[cfg_attr(test, mutants::skip)]
789792
fn load_costs(&mut self, clarity_db: &mut ClarityDatabase, apply_updates: bool) -> Result<()> {
790793
clarity_db.begin();
791794
let epoch_id = clarity_db

clarity/src/vm/types/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,6 +1529,10 @@ impl TupleData {
15291529
self.data_map.is_empty()
15301530
}
15311531

1532+
///TODO: #4587 create default for TupleData, then check if the mutation tests are caught for the case:
1533+
/// Ok((Default::default()))
1534+
/// Or keep the skip and remove the comment
1535+
#[cfg_attr(test, mutants::skip)]
15321536
pub fn from_data(data: Vec<(ClarityName, Value)>) -> Result<TupleData> {
15331537
let mut type_map = BTreeMap::new();
15341538
let mut data_map = BTreeMap::new();
@@ -1545,6 +1549,10 @@ impl TupleData {
15451549
Self::new(TupleTypeSignature::try_from(type_map)?, data_map)
15461550
}
15471551

1552+
///TODO: #4587 create default for TupleData, then check if the mutation tests are caught for the case:
1553+
/// Ok((Default::default()))
1554+
/// Or keep the skip and remove the comment
1555+
#[cfg_attr(test, mutants::skip)]
15481556
pub fn from_data_typed(
15491557
epoch: &StacksEpochId,
15501558
data: Vec<(ClarityName, Value)>,

0 commit comments

Comments
 (0)