diff options
author | kaiwu <kaiwu2004@gmail.com> | 2023-01-26 18:59:28 +0800 |
---|---|---|
committer | kaiwu <kaiwu2004@gmail.com> | 2023-01-26 18:59:28 +0800 |
commit | b24fbdd568fb1bc8a69aa4d7fe2d7a0812c9af86 (patch) | |
tree | 7078ce30f0ab80beb0a02777eb560b3b5983af35 /test | |
parent | e9945d14975c9fe57133c67834ab65b3c48021a8 (diff) | |
download | advent-of-code-b24fbdd568fb1bc8a69aa4d7fe2d7a0812c9af86.tar.gz advent-of-code-b24fbdd568fb1bc8a69aa4d7fe2d7a0812c9af86.zip |
2016 day21 part2
Diffstat (limited to 'test')
-rw-r--r-- | test/test_2016.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_2016.cpp b/test/test_2016.cpp index d2dec77..cc3fcfd 100644 --- a/test/test_2016.cpp +++ b/test/test_2016.cpp @@ -188,9 +188,11 @@ TEST_CASE("Firewall Rules", "[2016]") { TEST_CASE("", "[2016]") { line_view lv = load_file("../src/2016/day21/input"); - auto p = aoc2016::day21(lv); - REQUIRE(0 == p.first); - REQUIRE(0 == p.second); + char cs[8] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}; + char xs[8] = {'f', 'b', 'g', 'd', 'c', 'e', 'a', 'h'}; + aoc2016::day21(lv,cs, xs); + REQUIRE(memcmp(cs, "bdfhgeca", 8) == 0); + REQUIRE(memcmp(xs, "gdfcabeh", 8) == 0); } |