#![deny(
clippy::expect_used,
clippy::indexing_slicing,
clippy::panic,
clippy::todo,
clippy::unimplemented,
clippy::unwrap_used,
unsafe_op_in_unsafe_fn
)]
#![warn(missing_docs)]
#[cfg(feature = "allocation-audit")]
mod allocation_audit;
#[cfg(any(test, feature = "test-support"))]
#[doc(hidden)]
pub mod adversarial_test_support;
pub mod diag;
pub mod epoch;
pub mod format;
pub mod fts;
pub mod fusion;
pub mod graph;
pub mod ingest;
pub mod kernels;
pub mod lifecycle;
pub mod manifest;
pub mod meta;
pub mod planner;
pub mod quant;
pub mod scan;
pub mod segment;
pub mod sys;
pub mod tier;
pub mod vfs;
pub mod wal;
#[cfg(test)]
mod test_support;
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
#[cfg(test)]
#[allow(
clippy::expect_used,
clippy::indexing_slicing,
clippy::panic,
clippy::unwrap_used
)]
mod tests {
use rand::RngCore;
#[test]
#[cfg_attr(miri, ignore = "environment-dependent RNG is outside the Miri subset")]
fn seeded_rng_is_deterministic_per_name_and_env() {
let mut first =
crate::test_support::seeded_rng("tests::seeded_rng_is_deterministic_per_name_and_env");
let mut second =
crate::test_support::seeded_rng("tests::seeded_rng_is_deterministic_per_name_and_env");
let mut other_name = crate::test_support::seeded_rng("tests::another_test");
let first_draw = first.next_u64();
let second_draw = second.next_u64();
let other_name_draw = other_name.next_u64();
let environment_seed = std::env::var("ZE_TEST_SEED").unwrap_or_else(|_| String::from("0"));
let other_environment_seed = format!("{environment_seed}-different");
let mut other_env = crate::test_support::seeded_rng_from(
"tests::seeded_rng_is_deterministic_per_name_and_env",
&other_environment_seed,
);
let other_env_draw = other_env.next_u64();
assert_eq!(first_draw, second_draw);
assert_ne!(first_draw, other_name_draw);
assert_ne!(first_draw, other_env_draw);
}
#[test]
fn version_constant_is_current() {
assert_eq!(crate::VERSION, "0.4.2");
}
}