diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-01-08 12:34:47 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-01-09 16:01:39 +0100 |
| commit | 8b1c270910fce13077864bf39d6e88971a6eb062 (patch) | |
| tree | 2a441b58d46905f680749c1c074e9b55a27f0d6e /lib/xixanta/fuzz | |
| parent | 4f5710aa516ab149d132cdb5863db08f08c10563 (diff) | |
| download | tools.nes-8b1c270910fce13077864bf39d6e88971a6eb062.tar.gz tools.nes-8b1c270910fce13077864bf39d6e88971a6eb062.zip | |
Implement the .include statement
This needed some heavy lifting when it comes to how files were located.
This means that statements like .include/.incbin now take into
consideration a new list made out of SourceInfo, which holds enough
information to translate from which file a node comes from. This has
also been added into errors, so they are more informative on what went
wrong.
In order to tests this, besides all the regular unit tests, a new e2e
test has been added.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'lib/xixanta/fuzz')
| -rw-r--r-- | lib/xixanta/fuzz/fuzz_targets/fuzz_target_assembler.rs | 6 | ||||
| -rw-r--r-- | lib/xixanta/fuzz/fuzz_targets/fuzz_target_parser.rs | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/xixanta/fuzz/fuzz_targets/fuzz_target_assembler.rs b/lib/xixanta/fuzz/fuzz_targets/fuzz_target_assembler.rs index 9b9119b..a402998 100644 --- a/lib/xixanta/fuzz/fuzz_targets/fuzz_target_assembler.rs +++ b/lib/xixanta/fuzz/fuzz_targets/fuzz_target_assembler.rs @@ -4,9 +4,5 @@ use libfuzzer_sys::fuzz_target; use xixanta::assembler::assemble; fuzz_target!(|data: &[u8]| { - let _ = assemble( - data, - "empty", - std::env::current_dir().unwrap().to_path_buf(), - ); + let _ = assemble(data, "empty", xixanta::SourceInfo::default()); }); diff --git a/lib/xixanta/fuzz/fuzz_targets/fuzz_target_parser.rs b/lib/xixanta/fuzz/fuzz_targets/fuzz_target_parser.rs index 442dbbf..da8a350 100644 --- a/lib/xixanta/fuzz/fuzz_targets/fuzz_target_parser.rs +++ b/lib/xixanta/fuzz/fuzz_targets/fuzz_target_parser.rs @@ -4,5 +4,5 @@ use libfuzzer_sys::fuzz_target; fuzz_target!(|data: &[u8]| { let mut parser = xixanta::parser::Parser::default(); - let _ = parser.parse(data); + let _ = parser.parse(data, xixanta::SourceInfo::default()); }); |
