Skip to content

Commit e938dea

Browse files
committed
try adding a test that LowerHex and friends don't panic, but it doesn't work
1 parent c6d2bb7 commit e938dea

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

core/benches/fmt.rs

+14
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,17 @@ fn write_u64_min(bh: &mut Bencher) {
148148
test::black_box(format!("{}", 0u64));
149149
});
150150
}
151+
152+
#[bench]
153+
fn write_u8_max(bh: &mut Bencher) {
154+
bh.iter(|| {
155+
test::black_box(format!("{}", u8::MAX));
156+
});
157+
}
158+
159+
#[bench]
160+
fn write_u8_min(bh: &mut Bencher) {
161+
bh.iter(|| {
162+
test::black_box(format!("{}", 0u8));
163+
});
164+
}

0 commit comments

Comments
 (0)