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

Function test_is_hash_error

atomic-core/src/change/format_v3/error.rs:531–550  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

529
530 #[test]
531 fn test_is_hash_error() {
532 assert!(FormatError::HashTableFull.is_hash_error());
533 assert!(FormatError::HashIndexOutOfBounds {
534 index: 0,
535 table_size: 0
536 }
537 .is_hash_error());
538 assert!(FormatError::HashMismatch {
539 expected: String::new(),
540 computed: String::new(),
541 }
542 .is_hash_error());
543 assert!(FormatError::HashNotFound {
544 hash: String::new(),
545 }
546 .is_hash_error());
547
548 // Non-hash errors
549 assert!(!FormatError::InvalidMagic { got: [0; 4] }.is_hash_error());
550 }
551
552 #[test]
553 fn test_is_format_error() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected