mirror of
https://github.com/Noratrieb/advent-of-code.git
synced 2026-01-16 18:45:02 +01:00
tests
This commit is contained in:
parent
b093225df0
commit
7be7e7c549
3 changed files with 52 additions and 36 deletions
|
|
@ -130,23 +130,14 @@ fn part2(input: &str) -> u64 {
|
|||
.sum()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn part1() {
|
||||
helper::test_part1::<super::Day3>(&[
|
||||
(include_str!("../input_small.txt"), 4361),
|
||||
(include_str!("../input.txt"), 537832),
|
||||
]
|
||||
);
|
||||
helper::tests! {
|
||||
day3 Day3;
|
||||
part1 {
|
||||
small => 4361;
|
||||
default => 537832;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn part2() {
|
||||
helper::test_part2::<super::Day3>(&[
|
||||
(include_str!("../input_small.txt"), 467835),
|
||||
(include_str!("../input.txt"), 81939900),
|
||||
]
|
||||
);
|
||||
part2 {
|
||||
small => 467835;
|
||||
default => 81939900;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue