Macro aoc_driver::test_bytes [−][src]
test_bytes!() { /* proc-macro */ }
Expand description
Runs a test with given byte input
Usage:
test_bytes!(year, day, part, function, test_name, test_input, expected);
eg.
test_bytes!(2021, 1, 1, year2020::day1::part1, "simple", b"123", "456");
The function
may also be a string literal ie "year2020::day1::part1"
The _bytes
version calls the function with a &u8
The function should be able to take in a &[u8]
and output something which is displayable
eg.
fn example(input: &[u8]) -> impl std::fmt::Display {
...
}