Add solution for "Day 17: Chronospatial Computer", part 2
This commit is contained in:
@@ -276,11 +276,11 @@ TEST_CASE("[ChronospatialComputerTests]")
|
||||
TestContext test;
|
||||
SECTION("FullData")
|
||||
{
|
||||
test.run(std::make_unique<ChronospatialComputer>(), "5,0,3,5,7,6,1,5,4", 0, test.getInputPaths());
|
||||
test.run(std::make_unique<ChronospatialComputer>(), "5,0,3,5,7,6,1,5,4", 164516454365621, test.getInputPaths());
|
||||
}
|
||||
SECTION("ExampleData")
|
||||
{
|
||||
test.run(std::make_unique<ChronospatialComputer>(), "4,6,3,5,6,3,5,2,1,0", 0, test.getExampleInputPaths());
|
||||
test.runPart1(std::make_unique<ChronospatialComputer>(), "4,6,3,5,6,3,5,2,1,0", test.getExampleInputPaths());
|
||||
}
|
||||
SECTION("ExampleInstruction1")
|
||||
{
|
||||
|
||||
@@ -58,6 +58,15 @@ void TestContext::runPart1(const std::unique_ptr<Solver<long long, long long>>&&
|
||||
REQUIRE(expected == solver->getResultPart1());
|
||||
}
|
||||
|
||||
void TestContext::runPart1(const std::unique_ptr<Solver<std::string, long long>>&& solver, const std::string expected,
|
||||
const std::vector<std::string>& inputPaths)
|
||||
{
|
||||
SolverEngine solverEngine{ inputPaths };
|
||||
solverEngine.run(*solver);
|
||||
|
||||
REQUIRE(expected == solver->getResultPart1());
|
||||
}
|
||||
|
||||
void TestContext::runPart2(const std::unique_ptr<Solver<long long, long long>>&& solver, const long long expected,
|
||||
const std::vector<std::string>& inputPaths)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user