advent-of-code/2022/setup_day.sh

35 lines
597 B
Bash
Raw Permalink Normal View History

2022-11-29 12:29:49 +01:00
#!/bin/sh
today=$(date +%d)
aocd > inputs/day$today
echo '#![feature(test)]
extern crate test;
use aoc2022::{boilerplate, common::*};
2022-11-30 10:22:50 +01:00
const DAY: usize = '$today';
2022-11-29 12:45:03 +01:00
type Parsed = Vec<usize>;
2022-11-29 12:29:49 +01:00
2022-11-29 12:45:03 +01:00
fn parse_input(raw: &str) -> Parsed {
2022-11-30 10:22:50 +01:00
parse_nums(raw)
2022-11-29 12:45:03 +01:00
}
fn part1(parsed: &Parsed) -> usize {
unimplemented!()
}
fn part2(parsed: &Parsed) -> usize {
unimplemented!()
2022-11-30 10:22:50 +01:00
}
boilerplate! {
TEST_INPUT == "",
tests: {
part1: { TEST_INPUT => 0 },
part2: { TEST_INPUT => 0 },
},
bench1 == 0,
bench2 == 0,
bench_parse: Vec::len => 0,
2022-11-29 12:29:49 +01:00
}' > src/bin/day$today.rs