pub const W_ROS_001: &str = "W-ROS-001";
pub fn roster_warning_link(code: &str) -> String {
crate::diagnostic_link(code)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn every_code_is_unique_and_well_formed() {
let codes = [W_ROS_001];
for code in codes {
assert!(code.starts_with("W-ROS-"), "malformed code: {code}");
assert_eq!(code.len(), 9, "malformed code: {code}");
}
let mut unique = codes.to_vec();
unique.sort_unstable();
unique.dedup();
assert_eq!(unique.len(), codes.len(), "two W-ROS codes are equal");
}
#[test]
fn link_lowercases_the_code_into_the_anchor() {
assert_eq!(
roster_warning_link(W_ROS_001),
"https://docs.murmur.nexus/reference/diagnostics/#w-ros-001"
);
}
}