diff options
author | kaiwu <kaiwu2004@gmail.com> | 2022-04-04 09:59:21 +0800 |
---|---|---|
committer | kaiwu <kaiwu2004@gmail.com> | 2022-04-04 09:59:21 +0800 |
commit | e3d42a551d838e3fef28a132912f33740095c20b (patch) | |
tree | b37ea8ef02acfb6901f2d95ccc7a5864c1fc9eab /test/test_2017.cpp | |
parent | ecdce42a63557bcc653247ad77eaa30846a021f5 (diff) | |
download | advent-of-code-e3d42a551d838e3fef28a132912f33740095c20b.tar.gz advent-of-code-e3d42a551d838e3fef28a132912f33740095c20b.zip |
2017 day1
Diffstat (limited to 'test/test_2017.cpp')
-rw-r--r-- | test/test_2017.cpp | 13 |
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")); } |