-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathday.rs.tpl
63 lines (52 loc) · 1.19 KB
/
day.rs.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
use aoc::Parse;
type Input = u64;
type Output = usize;
register!(
"input/day.txt";
(input: input!(parse Input)) -> Output {
part1(&input);
part2(&input);
}
);
fn part1(items: &[Input]) -> Output {
0
}
fn part2(items: &[Input]) -> Output {
0
}
#[cfg(test)]
mod tests {
use super::*;
use aoc::{Solution, SolutionExt};
use test::Bencher;
#[test]
fn test_ex() {
let input = r#"
"#;
let (res1, res2) = Solver::run_on(input);
assert_eq!(res1, 0);
assert_eq!(res2, 0);
}
#[test]
fn test() {
let (res1, res2) = Solver::run_on_input();
assert_eq!(res1, 0);
assert_eq!(res2, 0);
}
#[bench]
fn bench_parsing(b: &mut Bencher) {
let input = Solver::puzzle_input();
b.bytes = `input.len()' as u64;
b.iter(|| Solver::parse_input(input));
}
#[bench]
fn bench_pt1(b: &mut Bencher) {
let input = Solver::parse_input(Solver::puzzle_input());
b.iter(|| part1(&input));
}
#[bench]
fn bench_pt2(b: &mut Bencher) {
let input = Solver::parse_input(Solver::puzzle_input());
b.iter(|| part2(&input));
}
}