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

Function test_transform_with_constraint

src/program/transform.rs:1661–1685  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1659
1660 #[test]
1661 fn test_transform_with_constraint() -> Result<()> {
1662 crate::config::Config::init_test("zlib");
1663 let deopt = Deopt::new("zlib".to_string())?;
1664 let test_file: PathBuf = [
1665 Deopt::get_crate_dir()?,
1666 "testsuites".into(),
1667 "new_test.cc".into(),
1668 ]
1669 .iter()
1670 .collect();
1671
1672 let constraints = crate::program::infer::load_constraints(&deopt)?;
1673 let corpora: PathBuf = [
1674 deopt.get_library_shared_corpus_dir()?,
1675 "vp80-00-comprehensive-014.ivf".into(),
1676 ]
1677 .iter()
1678 .collect();
1679 let mut transformer = Transformer::new_check(&test_file, &deopt)?;
1680 let changable_args = transformer.transform_with_execution_check(&constraints, &corpora)?;
1681 let mut transformer = Transformer::new(&test_file, &deopt)?;
1682 transformer.transform_to_fuzzer(&constraints, changable_args)?;
1683
1684 Ok(())
1685 }
1686}

Callers

nothing calls this directly

Calls 4

load_constraintsFunction · 0.85
transform_to_fuzzerMethod · 0.80

Tested by

no test coverage detected