Removed input paths parameter from public TestContext methods
This commit is contained in:
parent
63745ee91f
commit
32a239d14a
@ -27,20 +27,18 @@
|
|||||||
class TestContext
|
class TestContext
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void run(std::unique_ptr<Solver<int64_t, int64_t>>&& solver, const int64_t expected1, const int64_t expected2,
|
void runFull(std::unique_ptr<Solver<int64_t, int64_t>>&& solver, const int64_t expected1, const int64_t expected2);
|
||||||
const std::vector<std::string>& inputPaths);
|
void runFull(std::unique_ptr<Solver<int64_t, std::string>>&& solver, const int64_t expected1,
|
||||||
void run(std::unique_ptr<Solver<int64_t, std::string>>&& solver, const int64_t expected1,
|
const std::string& expected2);
|
||||||
const std::string& expected2, const std::vector<std::string>& inputPaths);
|
void runFull(std::unique_ptr<Solver<std::string, int64_t>>&& solver, const std::string& expected1,
|
||||||
void run(std::unique_ptr<Solver<std::string, int64_t>>&& solver, const std::string& expected1,
|
const int64_t expected2);
|
||||||
const int64_t expected2, const std::vector<std::string>& inputPaths);
|
void runExample(std::unique_ptr<Solver<int64_t, int64_t>>&& solver, const int64_t expected1,
|
||||||
void runPart1(std::unique_ptr<Solver<int64_t, int64_t>>&& solver, const int64_t expected,
|
const int64_t expected2);
|
||||||
const std::vector<std::string>& inputPaths);
|
void runExample(std::unique_ptr<Solver<int64_t, std::string>>&& solver, const int64_t expected1,
|
||||||
void runPart1(std::unique_ptr<Solver<std::string, int64_t>>&& solver, const std::string& expected,
|
const std::string& expected2);
|
||||||
const std::vector<std::string>& inputPaths);
|
void runExamplePart1(std::unique_ptr<Solver<int64_t, int64_t>>&& solver, const int64_t expected);
|
||||||
void runPart2(std::unique_ptr<Solver<int64_t, int64_t>>&& solver, const int64_t expected,
|
void runExamplePart1(std::unique_ptr<Solver<std::string, int64_t>>&& solver, const std::string& expected);
|
||||||
const std::vector<std::string>& inputPaths);
|
void runExamplePart2(std::unique_ptr<Solver<int64_t, int64_t>>&& solver, const int64_t expected);
|
||||||
std::vector<std::string> getInputPaths() const;
|
|
||||||
std::vector<std::string> getExampleInputPaths() const;
|
|
||||||
private:
|
private:
|
||||||
template <typename T1, typename T2>
|
template <typename T1, typename T2>
|
||||||
void runGeneric(const std::unique_ptr<Solver<T1, T2>>&& solver, const T1& expected1, const T2& expected2,
|
void runGeneric(const std::unique_ptr<Solver<T1, T2>>&& solver, const T1& expected1, const T2& expected2,
|
||||||
@ -72,4 +70,8 @@ class TestContext
|
|||||||
|
|
||||||
REQUIRE(expected == solver->getResultPart2());
|
REQUIRE(expected == solver->getResultPart2());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const inline std::vector<std::string> inputPaths_{ "data", "../../../data", "../../../../data" };
|
||||||
|
static const inline std::vector<std::string> exampleInputPaths_{ "data/examples", "../../../data/examples",
|
||||||
|
"../../../../data/examples" };
|
||||||
};
|
};
|
||||||
|
@ -46,11 +46,11 @@ TEST_CASE("[HistorianHysteriaTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<HistorianHysteria>(), 2176849, 23384288, test.getInputPaths());
|
test.runFull(std::make_unique<HistorianHysteria>(), 2176849, 23384288);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<HistorianHysteria>(), 11, 31, test.getExampleInputPaths());
|
test.runExample(std::make_unique<HistorianHysteria>(), 11, 31);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,11 +59,11 @@ TEST_CASE("[RedNosedReportsTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<RedNosedReports>(), 472, 520, test.getInputPaths());
|
test.runFull(std::make_unique<RedNosedReports>(), 472, 520);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<RedNosedReports>(), 2, 4, test.getExampleInputPaths());
|
test.runExample(std::make_unique<RedNosedReports>(), 2, 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,11 +72,11 @@ TEST_CASE("[MullItOverTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<MullItOver>(), 187833789, 94455185, test.getInputPaths());
|
test.runFull(std::make_unique<MullItOver>(), 187833789, 94455185);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<MullItOver>(), 161, 48, test.getExampleInputPaths());
|
test.runExample(std::make_unique<MullItOver>(), 161, 48);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,11 +85,11 @@ TEST_CASE("[CeresSearchTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<CeresSearch>(), 2462, 1877, test.getInputPaths());
|
test.runFull(std::make_unique<CeresSearch>(), 2462, 1877);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<CeresSearch>(), 18, 9, test.getExampleInputPaths());
|
test.runExample(std::make_unique<CeresSearch>(), 18, 9);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,11 +98,11 @@ TEST_CASE("[PrintQueueTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<PrintQueue>(), 5087, 4971, test.getInputPaths());
|
test.runFull(std::make_unique<PrintQueue>(), 5087, 4971);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<PrintQueue>(), 143, 123, test.getExampleInputPaths());
|
test.runExample(std::make_unique<PrintQueue>(), 143, 123);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,11 +111,11 @@ TEST_CASE("[GuardGallivantTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<GuardGallivant>(), 4665, 1688, test.getInputPaths());
|
test.runFull(std::make_unique<GuardGallivant>(), 4665, 1688);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<GuardGallivant>(), 41, 6, test.getExampleInputPaths());
|
test.runExample(std::make_unique<GuardGallivant>(), 41, 6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,11 +124,11 @@ TEST_CASE("[BridgeRepairTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<BridgeRepair>(), 12839601725877, 149956401519484, test.getInputPaths());
|
test.runFull(std::make_unique<BridgeRepair>(), 12839601725877, 149956401519484);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<BridgeRepair>(), 3749, 11387, test.getExampleInputPaths());
|
test.runExample(std::make_unique<BridgeRepair>(), 3749, 11387);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,11 +137,11 @@ TEST_CASE("[ResonantCollinearityTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<ResonantCollinearity>(), 426, 1359, test.getInputPaths());
|
test.runFull(std::make_unique<ResonantCollinearity>(), 426, 1359);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<ResonantCollinearity>(), 14, 34, test.getExampleInputPaths());
|
test.runExample(std::make_unique<ResonantCollinearity>(), 14, 34);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,11 +150,11 @@ TEST_CASE("[DiskFragmenterTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<DiskFragmenter>(), 6401092019345, 6431472344710, test.getInputPaths());
|
test.runFull(std::make_unique<DiskFragmenter>(), 6401092019345, 6431472344710);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<DiskFragmenter>(), 1928, 2858, test.getExampleInputPaths());
|
test.runExample(std::make_unique<DiskFragmenter>(), 1928, 2858);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,11 +163,11 @@ TEST_CASE("[HoofItTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<HoofIt>(), 611, 1380, test.getInputPaths());
|
test.runFull(std::make_unique<HoofIt>(), 611, 1380);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<HoofIt>(), 36, 81, test.getExampleInputPaths());
|
test.runExample(std::make_unique<HoofIt>(), 36, 81);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,11 +176,11 @@ TEST_CASE("[PlutonianPebblesTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<PlutonianPebbles>(), 220999, 261936432123724, test.getInputPaths());
|
test.runFull(std::make_unique<PlutonianPebbles>(), 220999, 261936432123724);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<PlutonianPebbles>(), 55312, 65601038650482, test.getExampleInputPaths());
|
test.runExample(std::make_unique<PlutonianPebbles>(), 55312, 65601038650482);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,27 +189,27 @@ TEST_CASE("[GardenGroupsTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<GardenGroups>(), 1477762, 923480, test.getInputPaths());
|
test.runFull(std::make_unique<GardenGroups>(), 1477762, 923480);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<GardenGroups>(), 1930, 1206, test.getExampleInputPaths());
|
test.runExample(std::make_unique<GardenGroups>(), 1930, 1206);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData2")
|
SECTION("ExampleData2")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<GardenGroups>(2), 140, 80, test.getExampleInputPaths());
|
test.runExample(std::make_unique<GardenGroups>(2), 140, 80);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData3")
|
SECTION("ExampleData3")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<GardenGroups>(3), 772, 436, test.getExampleInputPaths());
|
test.runExample(std::make_unique<GardenGroups>(3), 772, 436);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData4")
|
SECTION("ExampleData4")
|
||||||
{
|
{
|
||||||
test.runPart2(std::make_unique<GardenGroups>(4), 236, test.getExampleInputPaths());
|
test.runExamplePart2(std::make_unique<GardenGroups>(4), 236);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData5")
|
SECTION("ExampleData5")
|
||||||
{
|
{
|
||||||
test.runPart2(std::make_unique<GardenGroups>(5), 368, test.getExampleInputPaths());
|
test.runExamplePart2(std::make_unique<GardenGroups>(5), 368);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,11 +218,11 @@ TEST_CASE("[ClawContraptionTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<ClawContraption>(), 36571, 85527711500010, test.getInputPaths());
|
test.runFull(std::make_unique<ClawContraption>(), 36571, 85527711500010);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<ClawContraption>(), 480, 875318608908, test.getExampleInputPaths());
|
test.runExample(std::make_unique<ClawContraption>(), 480, 875318608908);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,11 +231,11 @@ TEST_CASE("[RestroomRedoubtTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<RestroomRedoubt>(), 224969976, 7892, test.getInputPaths());
|
test.runFull(std::make_unique<RestroomRedoubt>(), 224969976, 7892);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<RestroomRedoubt>(11, 7, false), 12, 0, test.getExampleInputPaths());
|
test.runExample(std::make_unique<RestroomRedoubt>(11, 7, false), 12, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,15 +244,15 @@ TEST_CASE("[WarehouseWoesTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<WarehouseWoes>(), 1515788, 1516544, test.getInputPaths());
|
test.runFull(std::make_unique<WarehouseWoes>(), 1515788, 1516544);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<WarehouseWoes>(), 10092, 9021, test.getExampleInputPaths());
|
test.runExample(std::make_unique<WarehouseWoes>(), 10092, 9021);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData2")
|
SECTION("ExampleData2")
|
||||||
{
|
{
|
||||||
test.runPart1(std::make_unique<WarehouseWoes>(2), 2028, test.getExampleInputPaths());
|
test.runExamplePart1(std::make_unique<WarehouseWoes>(2), 2028);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,15 +261,15 @@ TEST_CASE("[ReindeerMazeTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<ReindeerMaze>(), 72400, 435, test.getInputPaths());
|
test.runFull(std::make_unique<ReindeerMaze>(), 72400, 435);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<ReindeerMaze>(), 7036, 45, test.getExampleInputPaths());
|
test.runExample(std::make_unique<ReindeerMaze>(), 7036, 45);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData2")
|
SECTION("ExampleData2")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<ReindeerMaze>(2), 11048, 64, test.getExampleInputPaths());
|
test.runExample(std::make_unique<ReindeerMaze>(2), 11048, 64);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -278,11 +278,11 @@ TEST_CASE("[ChronospatialComputerTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<ChronospatialComputer>(), "5,0,3,5,7,6,1,5,4", 164516454365621, test.getInputPaths());
|
test.runFull(std::make_unique<ChronospatialComputer>(), "5,0,3,5,7,6,1,5,4", 164516454365621);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.runPart1(std::make_unique<ChronospatialComputer>(), "4,6,3,5,6,3,5,2,1,0", test.getExampleInputPaths());
|
test.runExamplePart1(std::make_unique<ChronospatialComputer>(), "4,6,3,5,6,3,5,2,1,0");
|
||||||
}
|
}
|
||||||
SECTION("ExampleInstruction1")
|
SECTION("ExampleInstruction1")
|
||||||
{
|
{
|
||||||
@ -333,11 +333,11 @@ TEST_CASE("[RamRunTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<RamRun>(), 248, "32,55", test.getInputPaths());
|
test.runFull(std::make_unique<RamRun>(), 248, "32,55");
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<RamRun>(7, 12), 22, "6,1", test.getExampleInputPaths());
|
test.runExample(std::make_unique<RamRun>(7, 12), 22, "6,1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -346,11 +346,11 @@ TEST_CASE("[LinenLayoutTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<LinenLayout>(), 272, 1041529704688380, test.getInputPaths());
|
test.runFull(std::make_unique<LinenLayout>(), 272, 1041529704688380);
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<LinenLayout>(), 6, 16, test.getExampleInputPaths());
|
test.runExample(std::make_unique<LinenLayout>(), 6, 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -359,10 +359,10 @@ TEST_CASE("[LanPartyTests]")
|
|||||||
TestContext test;
|
TestContext test;
|
||||||
SECTION("FullData")
|
SECTION("FullData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<LanParty>(), 1230, "", test.getInputPaths());
|
test.runFull(std::make_unique<LanParty>(), 1230, "");
|
||||||
}
|
}
|
||||||
SECTION("ExampleData")
|
SECTION("ExampleData")
|
||||||
{
|
{
|
||||||
test.run(std::make_unique<LanParty>(), 7, "", test.getExampleInputPaths());
|
test.runExample(std::make_unique<LanParty>(), 7, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,48 +15,47 @@
|
|||||||
|
|
||||||
#include <aocTests/TestContext.hpp>
|
#include <aocTests/TestContext.hpp>
|
||||||
|
|
||||||
void TestContext::run(std::unique_ptr<Solver<int64_t, int64_t>>&& solver, const int64_t expected1,
|
void TestContext::runFull(std::unique_ptr<Solver<int64_t, int64_t>>&& solver, const int64_t expected1,
|
||||||
const int64_t expected2, const std::vector<std::string>& inputPaths)
|
const int64_t expected2)
|
||||||
{
|
{
|
||||||
runGeneric(std::move(solver), expected1, expected2, inputPaths);
|
runGeneric(std::move(solver), expected1, expected2, inputPaths_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestContext::run(std::unique_ptr<Solver<int64_t, std::string>>&& solver, const int64_t expected1,
|
void TestContext::runFull(std::unique_ptr<Solver<int64_t, std::string>>&& solver, const int64_t expected1,
|
||||||
const std::string& expected2, const std::vector<std::string>& inputPaths)
|
const std::string& expected2)
|
||||||
{
|
{
|
||||||
runGeneric(std::move(solver), expected1, expected2, inputPaths);
|
runGeneric(std::move(solver), expected1, expected2, inputPaths_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestContext::run(std::unique_ptr<Solver<std::string, int64_t>>&& solver, const std::string& expected1,
|
void TestContext::runFull(std::unique_ptr<Solver<std::string, int64_t>>&& solver, const std::string& expected1,
|
||||||
const int64_t expected2, const std::vector<std::string>& inputPaths)
|
const int64_t expected2)
|
||||||
{
|
{
|
||||||
runGeneric(std::move(solver), expected1, expected2, inputPaths);
|
runGeneric(std::move(solver), expected1, expected2, inputPaths_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestContext::runPart1(std::unique_ptr<Solver<int64_t, int64_t>>&& solver, const int64_t expected,
|
void TestContext::runExample(std::unique_ptr<Solver<int64_t, int64_t>>&& solver, const int64_t expected1,
|
||||||
const std::vector<std::string>& inputPaths)
|
const int64_t expected2)
|
||||||
{
|
{
|
||||||
runPart1Generic(std::move(solver), expected, inputPaths);
|
runGeneric(std::move(solver), expected1, expected2, exampleInputPaths_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestContext::runPart1(std::unique_ptr<Solver<std::string, int64_t>>&& solver, const std::string& expected,
|
void TestContext::runExample(std::unique_ptr<Solver<int64_t, std::string>>&& solver, const int64_t expected1,
|
||||||
const std::vector<std::string>& inputPaths)
|
const std::string& expected2)
|
||||||
{
|
{
|
||||||
runPart1Generic(std::move(solver), expected, inputPaths);
|
runGeneric(std::move(solver), expected1, expected2, exampleInputPaths_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestContext::runPart2(std::unique_ptr<Solver<int64_t, int64_t>>&& solver, const int64_t expected,
|
void TestContext::runExamplePart1(std::unique_ptr<Solver<int64_t, int64_t>>&& solver, const int64_t expected)
|
||||||
const std::vector<std::string>& inputPaths)
|
|
||||||
{
|
{
|
||||||
runPart2Generic(std::move(solver), expected, inputPaths);
|
runPart1Generic(std::move(solver), expected, exampleInputPaths_);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> TestContext::getInputPaths() const
|
void TestContext::runExamplePart1(std::unique_ptr<Solver<std::string, int64_t>>&& solver, const std::string& expected)
|
||||||
{
|
{
|
||||||
return std::vector<std::string>{ "data", "../../../data", "../../../../data" };
|
runPart1Generic(std::move(solver), expected, exampleInputPaths_);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> TestContext::getExampleInputPaths() const
|
void TestContext::runExamplePart2(std::unique_ptr<Solver<int64_t, int64_t>>&& solver, const int64_t expected)
|
||||||
{
|
{
|
||||||
return std::vector<std::string>{ "data/examples", "../../../data/examples", "../../../../data/examples" };
|
runPart2Generic(std::move(solver), expected, exampleInputPaths_);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user