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

Function test_count_digits

atomic-core/src/output/repo/writer.rs:752–761  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

750
751 #[test]
752 fn test_count_digits() {
753 assert_eq!(count_digits(0), 1);
754 assert_eq!(count_digits(1), 1);
755 assert_eq!(count_digits(9), 1);
756 assert_eq!(count_digits(10), 2);
757 assert_eq!(count_digits(99), 2);
758 assert_eq!(count_digits(100), 3);
759 assert_eq!(count_digits(1000), 4);
760 assert_eq!(count_digits(u32::MAX), 10);
761 }
762
763 // ------------------------------------------------------------------------
764 // Flush Tests

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected