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:231–241  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

229
230 #[test]
231 fn test_generate_ulid_shape() {
232 let id = generate_ulid_lowercased();
233 assert_eq!(id.len(), 26, "ULID stem is 26 chars");
234 assert!(
235 id.chars()
236 .all(|c| c.is_ascii_lowercase() || c.is_ascii_digit()),
237 "ULID stem is lowercased Crockford base32: {id}"
238 );
239 // Two consecutive generations differ (randomness in the low bits).
240 assert_ne!(generate_ulid_lowercased(), generate_ulid_lowercased());
241 }
242
243 #[test]
244 fn test_new_writes_liftable_memory() {

Callers

nothing calls this directly

Calls 1

generate_ulid_lowercasedFunction · 0.85

Tested by

no test coverage detected