Skip to content

Commit bdc825c

Browse files
Merge pull request #45 from Certora/filter-constructors
Allow filtering constructors in the function filter
2 parents bf7ab3c + ee631cb commit bdc825c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/gambit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88

99
jobs:
1010
build-linux:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-22.04
1212
env:
1313
TAG: ${{ github.ref_name }}
1414
steps:

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)