rename parse
param to bench_parse
This commit is contained in:
parent
a6dfde6fc5
commit
22afa80e1b
|
@ -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,
|
||||
|
|
|
@ -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! {
|
||||
$($(paste::paste! {
|
||||
#[test]
|
||||
fn [<$part _test_ $to>]() {
|
||||
let input = parse_input($tpi);
|
||||
assert_eq!($part(&input), $to);
|
||||
}
|
||||
}
|
||||
)+)*
|
||||
})+)*
|
||||
bench!(part1() == $b1);
|
||||
bench!(part2() == $b2);
|
||||
#[bench]
|
||||
|
|
Loading…
Reference in New Issue
Block a user