MCPcopy Create free account
hub / github.com/bytesize-rs/bytesize / test_display

Function test_display

src/lib.rs:613–622  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

611
612 #[test]
613 fn test_display() {
614 assert_display("215 B", ByteSize::b(215));
615 assert_display("1.0 KiB", ByteSize::kib(1));
616 assert_display("301.0 KiB", ByteSize::kib(301));
617 assert_display("419.0 MiB", ByteSize::mib(419));
618 assert_display("518.0 GiB", ByteSize::gib(518));
619 assert_display("815.0 TiB", ByteSize::tib(815));
620 assert_display("609.0 PiB", ByteSize::pib(609));
621 assert_display("15.0 EiB", ByteSize::eib(15));
622 }
623
624 #[test]
625 fn test_display_alignment() {

Callers

nothing calls this directly

Calls 7

assert_displayFunction · 0.85
kibFunction · 0.85
mibFunction · 0.85
gibFunction · 0.85
tibFunction · 0.85
pibFunction · 0.85
eibFunction · 0.85

Tested by

no test coverage detected