MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / build_date_env_format

Function build_date_env_format

nodedb/src/version.rs:137–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135
136 #[test]
137 fn build_date_env_format() {
138 let date = env!("NODEDB_BUILD_DATE");
139 assert_eq!(
140 date.len(),
141 10,
142 "NODEDB_BUILD_DATE must be YYYY-MM-DD (10 chars)"
143 );
144 let bytes = date.as_bytes();
145 assert_eq!(bytes[4], b'-', "position 4 must be '-'");
146 assert_eq!(bytes[7], b'-', "position 7 must be '-'");
147 for (i, &b) in bytes.iter().enumerate() {
148 if i == 4 || i == 7 {
149 continue;
150 }
151 assert!(
152 b.is_ascii_digit(),
153 "position {i} must be a digit, got '{}'",
154 b as char
155 );
156 }
157 }
158
159 #[test]
160 fn features_str_contains_observability_capabilities() {

Callers

nothing calls this directly

Calls 2

as_bytesMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected