aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkaiwu <kaiwu2004@gmail.com>2023-01-26 18:59:28 +0800
committerkaiwu <kaiwu2004@gmail.com>2023-01-26 18:59:28 +0800
commitb24fbdd568fb1bc8a69aa4d7fe2d7a0812c9af86 (patch)
tree7078ce30f0ab80beb0a02777eb560b3b5983af35 /test
parente9945d14975c9fe57133c67834ab65b3c48021a8 (diff)
downloadadvent-of-code-b24fbdd568fb1bc8a69aa4d7fe2d7a0812c9af86.tar.gz
advent-of-code-b24fbdd568fb1bc8a69aa4d7fe2d7a0812c9af86.zip
2016 day21 part2
Diffstat (limited to 'test')
-rw-r--r--test/test_2016.cpp8
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);
}