aboutsummaryrefslogtreecommitdiff
path: root/test/test_2017.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_2017.cpp')
-rw-r--r--test/test_2017.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/test_2017.cpp b/test/test_2017.cpp
index be7c947..1dfb9e0 100644
--- a/test/test_2017.cpp
+++ b/test/test_2017.cpp
@@ -2,6 +2,15 @@
#include "catch.hpp"
#include <stdio.h>
-TEST_CASE("", "[2017]") {
- // line_view lv = load_file("../src/2017/day1/input");
+TEST_CASE("Inverse Captcha", "[2017]") {
+ line_view lv = load_file("../src/2017/day1/input");
+ REQUIRE(1253 == aoc2017::day1(lv));
+ REQUIRE(4 == aoc2017::day1("1111"));
+ REQUIRE(3 == aoc2017::day1("1122"));
+ REQUIRE(1278 == aoc2017::day1part2(lv));
+ REQUIRE(6 == aoc2017::day1part2("1212"));
+ REQUIRE(0 == aoc2017::day1part2("1221"));
+ REQUIRE(4 == aoc2017::day1part2("123425"));
+ REQUIRE(12 == aoc2017::day1part2("123123"));
+ REQUIRE(4 == aoc2017::day1part2("12131415"));
}