Add fuzzing
This commit is contained in:
parent
74626383cc
commit
c93381c429
3 changed files with 32 additions and 0 deletions
4
backend/fuzz/.gitignore
vendored
Normal file
4
backend/fuzz/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
target
|
||||||
|
corpus
|
||||||
|
artifacts
|
||||||
|
coverage
|
||||||
19
backend/fuzz/Cargo.toml
Normal file
19
backend/fuzz/Cargo.toml
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
[package]
|
||||||
|
name = "reconcile-fuzz"
|
||||||
|
version = "0.0.0"
|
||||||
|
publish = false
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[package.metadata]
|
||||||
|
cargo-fuzz = true
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
libfuzzer-sys = "0.4"
|
||||||
|
reconcile = { path = "../reconcile" }
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "reconcile"
|
||||||
|
path = "fuzz_targets/reconcile.rs"
|
||||||
|
test = false
|
||||||
|
doc = false
|
||||||
|
bench = false
|
||||||
9
backend/fuzz/fuzz_targets/reconcile.rs
Normal file
9
backend/fuzz/fuzz_targets/reconcile.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#![no_main]
|
||||||
|
|
||||||
|
use libfuzzer_sys::fuzz_target;
|
||||||
|
extern crate reconcile;
|
||||||
|
|
||||||
|
fuzz_target!(|texts: (String, String, String)| {
|
||||||
|
let (original, left, right) = texts;
|
||||||
|
reconcile::reconcile(&original, &left, &right);
|
||||||
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue