From 8a05a81128ca8fb2255f56475dd37de252f18ba6 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 1 Dec 2022 17:21:27 -0600 Subject: [PATCH] Day 2 scaffold --- 2022/rust/src/day2.rs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 2022/rust/src/day2.rs diff --git a/2022/rust/src/day2.rs b/2022/rust/src/day2.rs new file mode 100644 index 0000000..8780c01 --- /dev/null +++ b/2022/rust/src/day2.rs @@ -0,0 +1,32 @@ +mod common; + +fn main() { + let input = common::day_input(2); + println!("Part 1: {}", part1(&input)); + println!("Part 2: {}", part2(&input)); +} + +fn part1(input: &str) -> i32 { + 0 +} + +fn part2(input: &str) -> i32 { + 0 +} + +#[cfg(test)] +mod tests { + use super::*; + + const TEST_INPUT: &str = "0"; + + #[test] + fn test_part1() { + assert_eq!(part1(TEST_INPUT), 0) + } + + #[test] + fn test_part2() { + assert_eq!(part2(TEST_INPUT), 0) + } +}