diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-12-21 17:22:22 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-12-21 17:22:22 -0500 |
commit | e82a8cdfe29b3960095848fe9d2fdcbfd39a4ff3 (patch) | |
tree | 18ce633739e7748ed194a4eb4c24b263d7e5ca20 /bin | |
parent | 17b710ecb1039e9343e01a50620e763580c9ec90 (diff) | |
download | advent-of-code-e82a8cdfe29b3960095848fe9d2fdcbfd39a4ff3.tar.gz advent-of-code-e82a8cdfe29b3960095848fe9d2fdcbfd39a4ff3.zip |
also stub out tests
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/stub-code | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/stub-code b/bin/stub-code index 5a3bc8c..1212e33 100755 --- a/bin/stub-code +++ b/bin/stub-code @@ -24,6 +24,18 @@ pub fn part1(_: Todo) -> Result<i64> { pub fn part2(_: Todo) -> Result<i64> { todo!() } + +#[test] +fn test() { + assert_eq!( + part1(parse(parse::data($year, $day).unwrap()).unwrap()).unwrap(), + 0 + ); + assert_eq!( + part2(parse(parse::data($year, $day).unwrap()).unwrap()).unwrap(), + 0 + ); +} EOF perl -pi -E"\$seen_mod = 1 if /mod day$day/; if (!\$seen_mod && /NEXT MOD/) { say '#[path = \"$day/mod.rs\"]'; say 'mod day$day;'; }" src/"$year"/mod.rs |