advent-of-code/2023/setup_day.sh

36 lines
619 B
Bash
Raw Permalink Normal View History

2023-11-30 23:56:01 +01:00
#!/bin/sh
today=$(date +%d)
2023-12-18 16:43:13 +01:00
aocd "$today" > inputs/day$today
2023-11-30 23:56:01 +01:00
echo '#![feature(test)]
extern crate test;
use aoc2023::{boilerplate, common::*};
const DAY: usize = '$today';
2023-12-04 10:16:47 +01:00
type I = u32;
type Parsed = Vec<I>;
2023-11-30 23:56:01 +01:00
fn parse_input(raw: &str) -> Parsed {
parse_nums(raw)
}
fn part1(parsed: &Parsed) -> usize {
unimplemented!()
}
fn part2(parsed: &Parsed) -> usize {
unimplemented!()
}
boilerplate! {
2023-12-14 09:18:51 +01:00
TEST_INPUT == ""
for tests: {
2023-11-30 23:56:01 +01:00
part1: { TEST_INPUT => 0 },
part2: { TEST_INPUT => 0 },
},
bench1 == 0,
bench2 == 0,
bench_parse: Vec::len => 0,
}' > src/bin/day$today.rs