1
0
Fork 0

Replace assert_example!

It does not provide much value and cannot be used in some cases.
This commit is contained in:
Lars Martens 2025-12-12 07:40:25 +01:00
parent 69ea94bec0
commit 9abfac63da
Signed by: haselkern
GPG key ID: B5CF1F363C179AD4
11 changed files with 62 additions and 90 deletions

View file

@ -1,18 +1,17 @@
use aoc::*;
use microlp::{ComparisonOp, OptimizationDirection, Problem};
use std::collections::VecDeque;
const INPUT: &str = include_str!("../../input/10");
fn main() {
println!("Part 1: {}", part1(INPUT));
println!("Part 2: {}", part2(INPUT));
let input = include_str!("../../input/10");
println!("Part 1: {}", part1(input));
println!("Part 2: {}", part2(input));
}
#[test]
fn example() {
assert_example!(part1, "10-test", 7);
assert_example!(part2, "10-test", 33);
let input = include_str!("../../input/10-test");
assert_eq!(part1(input), 7);
assert_eq!(part2(input), 33);
}
fn part1(input: &str) -> usize {