rust/tests/run-make/test-benches/smokebench.rs

15 lines
231 B
Rust

#![feature(test)]
extern crate test;
#[bench]
fn smoke_yesiter(b: &mut test::Bencher) {
let mut i = 0usize;
b.iter(|| {
i = i.wrapping_add(1);
i
})
}
#[bench]
fn smoke_noiter(_: &mut test::Bencher) {}