diff options
author | kaiwu <kaiwu2004@gmail.com> | 2022-04-05 10:59:17 +0800 |
---|---|---|
committer | kaiwu <kaiwu2004@gmail.com> | 2022-04-05 10:59:17 +0800 |
commit | 19663fdfb6c2c61ee6f31c03cfe5277253cfa44e (patch) | |
tree | d80b477d6a2c406663d87caaf253628a632a653e /test | |
parent | 5e9ceee3104714002bb9e0aaffef78ef12e27fc6 (diff) | |
download | advent-of-code-19663fdfb6c2c61ee6f31c03cfe5277253cfa44e.tar.gz advent-of-code-19663fdfb6c2c61ee6f31c03cfe5277253cfa44e.zip |
2018 day2
Diffstat (limited to 'test')
-rw-r--r-- | test/test_2018.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_2018.cpp b/test/test_2018.cpp index fcd68ef..d74ec13 100644 --- a/test/test_2018.cpp +++ b/test/test_2018.cpp @@ -2,6 +2,7 @@ #include "2018/day2/aoc.h" #include "catch.hpp" #include <stdio.h> +#include <string.h> TEST_CASE("Chronal Calibration", "[2018]") { line_view lv = load_file("../src/2018/day1/input"); @@ -11,3 +12,11 @@ TEST_CASE("Chronal Calibration", "[2018]") { // REQUIRE(5 == aoc2018::day1part2("-6\n+3\n+8\n+5\n-6")); // REQUIRE(14 == aoc2018::day1part2("+7\n+7\n-2\n-7\n-4")); } + +TEST_CASE("Inventory Management System", "[2018]") { + line_view lv = load_file("../src/2018/day2/input"); + char common[26] = {0}; + auto p = aoc2018::day2(lv, common); + REQUIRE(6642 == p); + REQUIRE(strcmp("cvqlbidheyujgtrswxmckqnap", common) == 0); +} |