aboutsummaryrefslogtreecommitdiff
path: root/test/test_2022.cpp
diff options
context:
space:
mode:
authorkaiwu <kaiwu2004@gmail.com>2022-12-03 14:36:54 +0800
committerkaiwu <kaiwu2004@gmail.com>2022-12-03 14:36:54 +0800
commit5db1b89ab32e1d390f2a01cbbff339d456e69ea5 (patch)
treef0497badfd2ab5fc80ed8838ae4a938e7c5cdb6a /test/test_2022.cpp
parentc3e81e84ff4295ae5fb62439b00a02d9ad3db0b0 (diff)
downloadadvent-of-code-5db1b89ab32e1d390f2a01cbbff339d456e69ea5.tar.gz
advent-of-code-5db1b89ab32e1d390f2a01cbbff339d456e69ea5.zip
2022 day3
Diffstat (limited to 'test/test_2022.cpp')
-rw-r--r--test/test_2022.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_2022.cpp b/test/test_2022.cpp
index 5047fe1..0c2de12 100644
--- a/test/test_2022.cpp
+++ b/test/test_2022.cpp
@@ -1,5 +1,6 @@
#include "2022/day1/aoc.h"
#include "2022/day2/aoc.h"
+#include "2022/day3/aoc.h"
#include "catch.hpp"
#include <stdio.h>
@@ -16,3 +17,10 @@ TEST_CASE("Rock Paper Scissors", "[2022]") {
REQUIRE(17189 == p.first);
REQUIRE(13490 == p.second);
}
+
+TEST_CASE("Rucksack Reorganization", "[2022]") {
+ line_view lv = load_file("../src/2022/day3/input");
+ auto p = aoc2022::day3(lv);
+ REQUIRE(8185 == p.first);
+ REQUIRE(2817 == p.second);
+}