mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-02 18:13:39 +00:00
4b053e15ae
The contract tests no longer compiled on main (AtnItem::dictionary is now Vec<u8>, so it is compared with b"Future event"), sat outside main's tests/it layout, and the new atn.yml added six legs (two macOS) to every PR against ci.yml's policy. Move the tests into tests/it so the existing CI runs them, drop atn.yml and docs/atn-testing.md, keep main's ci.yml and fuzz target, and note the committed fixtures in ATTRIBUTION.md. Co-authored-by: denstu473 <63150090+denstu473@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
494 B
Rust
15 lines
494 B
Rust
//! Fuzz the `.atn` actions parser: any input must return `Ok` or `Err`, never panic, and
|
|
//! anything that parses must survive a write and parse back equal.
|
|
#![no_main]
|
|
|
|
use libfuzzer_sys::fuzz_target;
|
|
use photocraft_psd::atn;
|
|
|
|
fuzz_target!(|data: &[u8]| {
|
|
if let Ok(f) = atn::parse(data) {
|
|
let bytes = atn::write(&f).expect("a parsed set is writable");
|
|
let again = atn::parse(&bytes).expect("a written set parses");
|
|
assert_eq!(again.actions, f.actions);
|
|
}
|
|
});
|