rename parse param to bench_parse

This commit is contained in:
kageru 2022-11-29 12:56:07 +01:00
parent a6dfde6fc5
commit 22afa80e1b
2 changed files with 8 additions and 10 deletions

View File

@ -21,7 +21,7 @@ boilerplate! {
},
bench1 == 731731,
bench2 == 116115990,
parse: Vec::len => 200,
bench_parse: Vec::len => 200,
}
/// Naive solution for a previous day 1,

View File

@ -7,7 +7,7 @@ macro_rules! boilerplate {
},
bench1 == $b1: literal,
bench2 == $b2: literal,
parse: $input_fn: expr => $it: literal$(,)?
bench_parse: $input_fn: expr => $it: literal$(,)?
) => {
fn main() {
let input = parse_input(&read_file(DAY));
@ -22,15 +22,13 @@ macro_rules! boilerplate {
const TEST_INPUT: &str = $ti;
$($(
paste::paste! {
#[test]
fn [<$part _test_ $to>]() {
let input = parse_input($tpi);
assert_eq!($part(&input), $to);
}
$($(paste::paste! {
#[test]
fn [<$part _test_ $to>]() {
let input = parse_input($tpi);
assert_eq!($part(&input), $to);
}
)+)*
})+)*
bench!(part1() == $b1);
bench!(part2() == $b2);
#[bench]