#[cfg(feature = "embed-configs")]
#[test]
fn test_generated_embedded_configs_consistency() {
use std::collections::HashSet;
use rgrc::{EMBEDDED_CONFIG_NAMES, EMBEDDED_CONFIGS};
assert!(
!EMBEDDED_CONFIG_NAMES.is_empty(),
"EMBEDDED_CONFIG_NAMES should not be empty"
);
assert_eq!(
EMBEDDED_CONFIGS.len(),
EMBEDDED_CONFIG_NAMES.len(),
"Names list and configs length should match"
);
let names: HashSet<&str> = EMBEDDED_CONFIG_NAMES.iter().copied().collect();
for (name, content) in EMBEDDED_CONFIGS.iter() {
assert!(
names.contains(name),
"Config name {} not in names list",
name
);
assert!(
!content.is_empty(),
"Embedded config {} should not be empty",
name
);
}
assert!(
EMBEDDED_CONFIG_NAMES.contains(&"conf.ping"),
"Expected conf.ping to be embedded"
);
}