MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / init

Method init

src/feedback/branches.rs:161–177  ·  view source on GitHub ↗
(&mut self, coverage: &CodeCoverage)

Source from the content-addressed store, hash-verified

159 }
160
161 fn init(&mut self, coverage: &CodeCoverage) {
162 for func_cov in coverage.iter_function_covs() {
163 let func_name = func_cov.get_name();
164 let func_branches = &func_cov.branches;
165 let mut branches = Vec::new();
166 for branch_state in func_branches {
167 let (true_branch, false_branch) = BranchState::from_llvm_cov(branch_state);
168 branches.push(true_branch.clear_bucket());
169 branches.push(false_branch.clear_bucket());
170 }
171 let func_branches = FuncBranches::new(branches);
172 if self.branches.contains_key(func_name) {
173 continue;
174 }
175 self.branches.insert(func_name.to_string(), func_branches);
176 }
177 }
178
179 pub fn has_new(&mut self, coverage: &CodeCoverage) -> HashMap<String, Vec<BranchState>> {
180 if self.is_empty() {

Callers 1

has_newMethod · 0.45

Calls 4

iter_function_covsMethod · 0.80
clear_bucketMethod · 0.80
get_nameMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected