advent-of-code/2021/setup_day.sh

44 lines
741 B
Bash
Raw Normal View History

2021-11-22 14:30:40 +01:00
#!/bin/sh
today=$(date +%d)
aocd > inputs/day$today
2021-11-22 14:30:40 +01:00
echo '#![feature(test)]
extern crate test;
use aoc2021::common::*;
2021-11-22 14:30:40 +01:00
2021-12-03 07:02:58 +01:00
const DAY: usize = '$today';
2021-11-22 14:30:40 +01:00
type Parsed = Vec<usize>;
fn parse_input(raw: &str) -> Parsed {
2021-12-21 23:39:43 +01:00
todo!()
2021-11-22 14:30:40 +01:00
}
fn part1(parsed: &Parsed) -> usize {
2021-12-21 23:39:43 +01:00
todo!()
2021-11-22 14:30:40 +01:00
}
fn part2(parsed: &Parsed) -> usize {
2021-12-21 23:39:43 +01:00
todo!()
2021-11-22 14:30:40 +01:00
}
fn main() {
let input = parse_input(&read_file(DAY));
2021-11-22 14:30:40 +01:00
println!("Part 1: {}", part1(&input));
println!("Part 2: {}", part2(&input));
}
#[cfg(test)]
mod tests {
use super::*;
use aoc2021::*;
2021-11-22 14:30:40 +01:00
const TEST_INPUT: &str = "";
test!(part1() == 0);
test!(part2() == 0);
bench!(part1() == 0);
bench!(part2() == 0);
2021-12-03 17:05:53 +01:00
bench_input!(Vec::len => 0);
2021-11-22 14:30:40 +01:00
}' > src/bin/day$today.rs