Skip to content

Commit 890bb53

Browse files
allow filtering constructors
1 parent bf7ab3c commit 890bb53

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/mutator.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,15 @@ impl SolASTVisitor<Rc<Source>, Vec<Mutant>> for Mutator {
265265
return false;
266266
}
267267
}
268+
} else if node.node_kind() == Some("constructor".to_string()) {
269+
match &self.conf.funcs_to_mutate {
270+
Some(fns) => {
271+
return !fns.contains(&"constructor".to_string());
272+
}
273+
None => {
274+
return false;
275+
}
276+
}
268277
}
269278
}
270279
}

0 commit comments

Comments
 (0)