feat: add template
This commit is contained in:
parent
0279c63a39
commit
4c0b4fb32d
3 changed files with 51 additions and 0 deletions
7
Cargo.lock
generated
7
Cargo.lock
generated
|
@ -13,6 +13,7 @@ name = "advent-of-code-2024"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dotenvy",
|
||||
"indoc",
|
||||
"ureq",
|
||||
]
|
||||
|
||||
|
@ -232,6 +233,12 @@ dependencies = [
|
|||
"icu_properties",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "indoc"
|
||||
version = "2.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.167"
|
||||
|
|
|
@ -5,4 +5,5 @@ edition = "2021"
|
|||
|
||||
[dependencies]
|
||||
dotenvy = "0.15.7"
|
||||
indoc = "2.0.5"
|
||||
ureq = "2.11.0"
|
||||
|
|
43
src/solutions/template.rs
Normal file
43
src/solutions/template.rs
Normal file
|
@ -0,0 +1,43 @@
|
|||
use crate::common::{Answer, Solution};
|
||||
|
||||
pub struct DayXX;
|
||||
|
||||
impl Solution for DayXX {
|
||||
fn name(&self) -> &'static str {
|
||||
""
|
||||
}
|
||||
|
||||
fn part_a(&self, input: &str) -> Answer {
|
||||
Answer::Unimplemented
|
||||
}
|
||||
|
||||
fn part_b(&self, input: &str) -> Answer {
|
||||
Answer::Unimplemented
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::DayXX;
|
||||
use crate::common::Solution;
|
||||
|
||||
use indoc::indoc;
|
||||
|
||||
const INPUT_A: &str = indoc! {"
|
||||
|
||||
"};
|
||||
|
||||
const INPUT_B: &str = indoc! {"
|
||||
|
||||
"};
|
||||
|
||||
#[test]
|
||||
fn part_a() {
|
||||
assert_eq!(DayXX.part_a(INPUT_A), crate::common::Answer::Unimplemented);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn part_b() {
|
||||
assert_eq!(DayXX.part_b(INPUT_B), crate::common::Answer::Unimplemented);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue