aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkaiwu <kaiwu2004@gmail.com>2022-04-04 10:55:15 +0800
committerkaiwu <kaiwu2004@gmail.com>2022-04-04 10:55:15 +0800
commitdb6c4680263981594cacd464e4abfea38586b9d5 (patch)
tree1a83e4ce89b58ebb15afe7896020125c238c9d12 /test
parente3d42a551d838e3fef28a132912f33740095c20b (diff)
downloadadvent-of-code-db6c4680263981594cacd464e4abfea38586b9d5.tar.gz
advent-of-code-db6c4680263981594cacd464e4abfea38586b9d5.zip
2018 day1
Diffstat (limited to 'test')
-rw-r--r--test/test_2018.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/test_2018.cpp b/test/test_2018.cpp
index ac15881..57c3845 100644
--- a/test/test_2018.cpp
+++ b/test/test_2018.cpp
@@ -2,6 +2,11 @@
#include "catch.hpp"
#include <stdio.h>
-TEST_CASE("", "[2018]") {
- // line_view lv = load_file("../src/2018/day1/input");
+TEST_CASE("Chronal Calibration", "[2018]") {
+ line_view lv = load_file("../src/2018/day1/input");
+ REQUIRE(522 == aoc2018::day1(lv));
+ REQUIRE(73364 == aoc2018::day1part2(lv));
+ // REQUIRE(10 == aoc2018::day1part2("+3\n+3\n+4\n-2\n-4"));
+ // 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"));
}