MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_generate_ulid_shape

Function test_generate_ulid_shape

atomic-cli/src/commands/memory/new.rs:168–178  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

166
167 #[test]
168 fn test_generate_ulid_shape() {
169 let id = generate_ulid_lowercased();
170 assert_eq!(id.len(), 26, "ULID stem is 26 chars");
171 assert!(
172 id.chars()
173 .all(|c| c.is_ascii_lowercase() || c.is_ascii_digit()),
174 "ULID stem is lowercased Crockford base32: {id}"
175 );
176 // Two consecutive generations differ (randomness in the low bits).
177 assert_ne!(generate_ulid_lowercased(), generate_ulid_lowercased());
178 }
179
180 #[test]
181 fn test_new_writes_liftable_memory() {

Callers

nothing calls this directly

Calls 1

generate_ulid_lowercasedFunction · 0.85

Tested by

no test coverage detected