use crate::core::NormalizedPath;
use crate::hash::ContentHash;
use tempfile::TempDir;
use super::super::context::CompileContext;
use super::super::search_paths::IncludeSearchPaths;
mod behavioral;
mod persistence;
mod round_trip;
pub(super) fn test_path(dir: &TempDir) -> NormalizedPath {
dir.path().join("depgraph.bin").into()
}
pub(super) fn make_ctx(source: &str) -> CompileContext {
CompileContext {
source_file: NormalizedPath::from(source),
include_search: IncludeSearchPaths::default(),
defines: Vec::new(),
flags: Vec::new(),
force_includes: Vec::new(),
unknown_flags: Vec::new(),
}
}
pub(super) fn dummy_hash(path: &std::path::Path) -> Option<ContentHash> {
Some(crate::hash::hash_bytes(path.to_string_lossy().as_bytes()))
}
pub(super) fn always_fresh(_: &std::path::Path) -> bool {
true
}