Skip to content

Test: Adapt display_parse_tree unit test to support multifile programs #350

Description

@LesterEvSe

Project version

master (unreleased)

Project

test

What happened?

Current Behavior: The unit test inside display_parse_tree.rs is currently flagged with #[ignore] because it fails during file_id initialization.

Expected Behavior: We need to update the test setup to properly initialize and mock the file_id assignments so that it fully supports the new multifile program architecture. Once adapted, the #[ignore] attribute should be removed.

Minimal reproduction steps

This issue became reproducible after PR #337 was merged. You can reproduce it by uncommenting the following code:

#[cfg(fuzzing)]
libfuzzer_sys::fuzz_target!(|data: simplicityhl::parse::Program| {
    // TODO: Adapt to multifile program. 
    // Temporarily disabled to prevent panics during file_id initialization.

    // do_test(data);

    let _ = data;
});

and running it via RUSTUP_TOOLCHAIN=nightly just fuzz display_parse_tree

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions