add template

This commit is contained in:
Jan Christian Grünhage 2021-12-09 08:30:06 +01:00
parent e20149a5c4
commit 52929d9a95
3 changed files with 48 additions and 0 deletions

48
src/day_xx/mod.rs Normal file
View file

@ -0,0 +1,48 @@
mod model;
mod parsing;
use aoc_runner_derive::{aoc, aoc_generator};
//pub use model::{};
//pub use parsing::{};
use yap::IntoTokens;
#[aoc_generator(dayx)]
pub fn parse_input(input: &str) -> Vec<Input> {
parse_input_tokens(&mut input.into_tokens())
}
#[aoc(dayx, part1)]
pub fn part1(input: &[Input]) -> usize {
unimplemented!();
}
#[aoc(dayx, part2)]
pub fn part2(input: &[Input]) -> usize {
unimplemented!();
}
#[cfg(test)]
mod test {
const EXAMPLE_INPUT: &str = "";
const RESULT_PART_1: usize = 0;
const RESULT_PART_2: usize = 0;
#[test]
fn part1_example() {
let result = super::part1(&super::parse_input(EXAMPLE_INPUT));
assert_eq!(result, RESULT_PART_1);
}
#[test]
fn part2_example() {
let result = super::part2(&super::parse_input(EXAMPLE_INPUT));
assert_eq!(result, RESULT_PART_2);
}
#[test]
fn parse_example() {
let example = super::parse_input(EXAMPLE_INPUT);
unimplemented!();
}
}

0
src/day_xx/model.rs Normal file
View file

0
src/day_xx/parsing.rs Normal file
View file