mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-01-12 16:53:21 +08:00
added the mutants from PR #4483
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -762,6 +762,7 @@ dependencies = [
|
||||
"hashbrown 0.14.3",
|
||||
"integer-sqrt",
|
||||
"lazy_static",
|
||||
"mutants",
|
||||
"rand 0.8.5",
|
||||
"rand_chacha 0.3.1",
|
||||
"regex",
|
||||
|
||||
@@ -31,6 +31,7 @@ stacks_common = { package = "stacks-common", path = "../stacks-common" }
|
||||
rstest = "0.17.0"
|
||||
rstest_reuse = "0.5.0"
|
||||
hashbrown = { workspace = true }
|
||||
mutants = "0.0.3"
|
||||
|
||||
[dependencies.serde_json]
|
||||
version = "1.0"
|
||||
|
||||
@@ -45,6 +45,7 @@ impl TraitsResolver {
|
||||
TraitsResolver {}
|
||||
}
|
||||
|
||||
#[cfg_attr(test, mutants::skip)]
|
||||
pub fn run(&mut self, contract_ast: &mut ContractAST) -> ParseResult<()> {
|
||||
let mut referenced_traits = HashMap::new();
|
||||
|
||||
|
||||
@@ -786,6 +786,9 @@ impl TrackerData {
|
||||
/// `apply_updates` - tells this function to look for any changes in the cost voting contract
|
||||
/// which would need to be applied. if `false`, just load the last computed cost state in this
|
||||
/// fork.
|
||||
/// TODO: #4587 add test for Err cases
|
||||
/// Or keep the skip and remove the comment
|
||||
#[cfg_attr(test, mutants::skip)]
|
||||
fn load_costs(&mut self, clarity_db: &mut ClarityDatabase, apply_updates: bool) -> Result<()> {
|
||||
clarity_db.begin();
|
||||
let epoch_id = clarity_db
|
||||
|
||||
@@ -1528,7 +1528,11 @@ impl TupleData {
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.data_map.is_empty()
|
||||
}
|
||||
|
||||
|
||||
///TODO: #4587 create default for TupleData, then check if the mutation tests are caught for the case:
|
||||
/// Ok((Default::default()))
|
||||
/// Or keep the skip and remove the comment
|
||||
#[cfg_attr(test, mutants::skip)]
|
||||
pub fn from_data(data: Vec<(ClarityName, Value)>) -> Result<TupleData> {
|
||||
let mut type_map = BTreeMap::new();
|
||||
let mut data_map = BTreeMap::new();
|
||||
@@ -1545,6 +1549,10 @@ impl TupleData {
|
||||
Self::new(TupleTypeSignature::try_from(type_map)?, data_map)
|
||||
}
|
||||
|
||||
///TODO: #4587 create default for TupleData, then check if the mutation tests are caught for the case:
|
||||
/// Ok((Default::default()))
|
||||
/// Or keep the skip and remove the comment
|
||||
#[cfg_attr(test, mutants::skip)]
|
||||
pub fn from_data_typed(
|
||||
epoch: &StacksEpochId,
|
||||
data: Vec<(ClarityName, Value)>,
|
||||
|
||||
Reference in New Issue
Block a user