Add fuzzing

This commit is contained in:
Andras Schmelczer 2024-11-30 11:56:23 +00:00
parent 74626383cc
commit c93381c429
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
3 changed files with 32 additions and 0 deletions

4
backend/fuzz/.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
target
corpus
artifacts
coverage

19
backend/fuzz/Cargo.toml Normal file
View 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

View 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);
});