diff options
author | kaiwu <kaiwu2004@gmail.com> | 2022-04-04 22:06:42 +0800 |
---|---|---|
committer | kaiwu <kaiwu2004@gmail.com> | 2022-04-04 22:06:42 +0800 |
commit | 2979620386ddaa7feb90a1e75a2fa8cfe7b77c66 (patch) | |
tree | d456595b31b49bfc84f1dcbfce35f2d6f4ca097c /test/test_2016.cpp | |
parent | c5af45b0a6985aae151783ce27b752b885bd6c06 (diff) | |
download | advent-of-code-2979620386ddaa7feb90a1e75a2fa8cfe7b77c66.tar.gz advent-of-code-2979620386ddaa7feb90a1e75a2fa8cfe7b77c66.zip |
2016 day2
Diffstat (limited to 'test/test_2016.cpp')
-rw-r--r-- | test/test_2016.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_2016.cpp b/test/test_2016.cpp index 87b674f..288b8f7 100644 --- a/test/test_2016.cpp +++ b/test/test_2016.cpp @@ -2,6 +2,7 @@ #include "2016/day2/aoc.h" #include "catch.hpp" #include <stdio.h> +#include <string.h> TEST_CASE("No Time for a Taxicab", "[2016]") { line_view lv = load_file("../src/2016/day1/input"); @@ -12,5 +13,8 @@ TEST_CASE("No Time for a Taxicab", "[2016]") { TEST_CASE("Bathroom Security", "[2016]") { line_view lv = load_file("../src/2016/day2/input"); - REQUIRE(82958 == aoc2016::day2(lv)); + char codes[6] = {0}; + int code = aoc2016::day2(lv, codes); + REQUIRE(82958 == code); + REQUIRE(strcmp(codes, "B3DB8") == 0); } |