37 lines
708 B
Rust
37 lines
708 B
Rust
//! Day 0: Dummy challenge for testing
|
|
|
|
pub const DAY: u8 = 0;
|
|
pub const TITLE: &str = "Dummy challenge for testing";
|
|
|
|
pub fn part1(input: Vec<String>) -> String {
|
|
input[0].to_owned()
|
|
}
|
|
|
|
pub fn part2(input: Vec<String>) -> String {
|
|
input[1].to_owned()
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
use super::*;
|
|
|
|
#[test]
|
|
fn t_example1() {
|
|
assert_eq!(part1(crate::read_example(DAY, 1)), "123");
|
|
}
|
|
|
|
#[test]
|
|
fn t_part1() {
|
|
assert_eq!(part1(crate::read_input(DAY)), "123");
|
|
}
|
|
|
|
#[test]
|
|
fn t_example2() {
|
|
assert_eq!(part2(crate::read_example(DAY, 2)), "456");
|
|
}
|
|
|
|
#[test]
|
|
fn t_part2() {
|
|
assert_eq!(part2(crate::read_input(DAY)), "456");
|
|
}
|
|
}
|