summaryrefslogtreecommitdiffstats
path: root/tests/run-make/test-benches/smokebench.rs
blob: ef5e5a620684701fe7716ec325304185f5501945 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![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) {}