Add TestContext::runPart1() for tests that are only valid for part 1 of a puzzle
This commit is contained in:
@@ -29,6 +29,15 @@ void TestContext::run(const std::unique_ptr<Solver>&& solver, const long long in
|
||||
REQUIRE(expected2 == solver->getResultPart2());
|
||||
}
|
||||
|
||||
void TestContext::runPart1(const std::unique_ptr<Solver>&& solver, const long long int 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>&& solver, const long long int expected,
|
||||
const std::vector<std::string>& inputPaths)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user