From af99955fc2dbf15b8e4de129e267e350ab90f516 Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Sat, 10 Dec 2022 15:18:39 -0800 Subject: [PATCH] add test section to template --- 2022-aoc/template.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/2022-aoc/template.rs b/2022-aoc/template.rs index 663c83b..fbde393 100644 --- a/2022-aoc/template.rs +++ b/2022-aoc/template.rs @@ -16,3 +16,22 @@ fn part1(input: &[INPUT]) -> u32 { fn part2(input: &[INPUT]) -> u32 { 0 } + +#[cgf(test)] +mod test { + use super::*; + const INPUT: &str = ""; + + #[test] + fn part1_test() { + let v = parse_input(INPUT); + + assert_eq!(part1(&vm), 1); + } + + #[test] + fn part2_test() { + let v = parse_input(INPUT); + assert_eq!(part2(&vm), 1); + } +}