Skip to content

Commit 0bf4967

Browse files
committed
Add macro arm for only running single part of days solution
1 parent 47e4f22 commit 0bf4967

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/template/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,15 @@ macro_rules! solution {
4545
run_part(part_two, &input, DAY, 2);
4646
}
4747
};
48+
($day:expr, $part:expr) => { /// Allows testing partially implemented solutions on full input
49+
50+
const DAY: advent_of_code::Day = advent_of_code::day!($day);
51+
const PART: u8 = $part;
52+
53+
fn main() {
54+
use advent_of_code::template::runner::*;
55+
let input = advent_of_code::template::read_file("inputs", DAY);
56+
run_part(part_one, &input, DAY, PART);
57+
}
58+
};
4859
}

0 commit comments

Comments
 (0)