mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-07 04:23:30 +00:00
![Martin Nordholts](/assets/img/avatar_default.png)
As you can see the padding is wrong when running benches as tests. This will be fixed in the next commit. (Benches should only be padded when run as benches to make it easy to compare the benchmark numbers.)
19 lines
285 B
Rust
19 lines
285 B
Rust
#![feature(test)]
|
|
extern crate test;
|
|
|
|
#[test]
|
|
fn short_test_name() {}
|
|
|
|
#[test]
|
|
fn this_is_a_really_long_test_name() {}
|
|
|
|
#[bench]
|
|
fn short_bench_name(b: &mut test::Bencher) {
|
|
b.iter(|| 1);
|
|
}
|
|
|
|
#[bench]
|
|
fn this_is_a_really_long_bench_name(b: &mut test::Bencher) {
|
|
b.iter(|| 1);
|
|
}
|