//! Build-time identity constants for `anc` itself.
//!
//! `ANC_VERSION` is the crate version (`CARGO_PKG_VERSION`) and surfaces in the
//! scorecard's `anc.version` so a consumer can identify the `anc` build that
//! produced a scorecard. Generated by `build.rs` into `$OUT_DIR/build_info.rs`.
include!(concat!(env!("OUT_DIR"), "/build_info.rs"));
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn anc_version_matches_cargo_pkg_version() {
// The build script must populate `ANC_VERSION` from `CARGO_PKG_VERSION`.
// If they ever diverge, the scorecard's `anc.version` would lie about
// which crate version produced it — silently.
assert_eq!(ANC_VERSION, env!("CARGO_PKG_VERSION"));
}
#[test]
fn anc_version_is_non_empty() {
assert!(!ANC_VERSION.is_empty());
}
}