aboutsummaryrefslogtreecommitdiff
path: root/test/test_2022.cpp
diff options
context:
space:
mode:
authorkaiwu <kaiwu2004@gmail.com>2022-12-05 16:05:02 +0800
committerkaiwu <kaiwu2004@gmail.com>2022-12-05 16:05:02 +0800
commit2f828ddfb1f649f8ed53291bdaf9457c2f633f75 (patch)
treecb50b1edcd56cd7895fd71e8c6be2cbc0e1a75ef /test/test_2022.cpp
parentc2820ed7b706a580bc60a74a0d2af806ca57f501 (diff)
downloadadvent-of-code-2f828ddfb1f649f8ed53291bdaf9457c2f633f75.tar.gz
advent-of-code-2f828ddfb1f649f8ed53291bdaf9457c2f633f75.zip
2022 day5
Diffstat (limited to 'test/test_2022.cpp')
-rw-r--r--test/test_2022.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/test_2022.cpp b/test/test_2022.cpp
index 3dfa704..387c575 100644
--- a/test/test_2022.cpp
+++ b/test/test_2022.cpp
@@ -5,6 +5,7 @@
#include "2022/day5/aoc.h"
#include "catch.hpp"
#include <stdio.h>
+#include <string.h>
TEST_CASE("Calorie Counting", "[2022]") {
line_view lv = load_file("../src/2022/day1/input");
@@ -36,7 +37,9 @@ TEST_CASE("Camp Cleanup", "[2022]") {
TEST_CASE("", "[2022]") {
line_view lv = load_file("../src/2022/day5/input");
- auto p = aoc2022::day5(lv);
- REQUIRE(0 == p.first);
- REQUIRE(0 == p.second);
+ char message[10] = {0};
+ aoc2022::day5(lv, message, 1);
+ REQUIRE(strcmp(message,"JCMHLVGMG") == 0);
+ aoc2022::day5(lv, message, 2);
+ REQUIRE(strcmp(message,"LVMRWSSPZ") == 0);
}