// Solutions to the Advent Of Code 2024. // Copyright (C) 2024-2025 Stefan Müller // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free Software // Foundation, either version 3 of the License, or (at your option) any later // version. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. // // You should have received a copy of the GNU General Public License along with // this program. If not, see . #include #include // Solver implementations in day order. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define REQUIRE_MESSAGE(cond, msg) if (!(cond)) { INFO(msg); REQUIRE(cond); } TEST_CASE("[HistorianHysteriaTests]") { TestContext test; SECTION("FullData") { test.run(std::make_unique(), 2176849, 23384288, test.getInputPaths()); } SECTION("ExampleData") { test.run(std::make_unique(), 11, 31, test.getExampleInputPaths()); } } TEST_CASE("[RedNosedReportsTests]") { TestContext test; SECTION("FullData") { test.run(std::make_unique(), 472, 520, test.getInputPaths()); } SECTION("ExampleData") { test.run(std::make_unique(), 2, 4, test.getExampleInputPaths()); } } TEST_CASE("[MullItOverTests]") { TestContext test; SECTION("FullData") { test.run(std::make_unique(), 187833789, 94455185, test.getInputPaths()); } SECTION("ExampleData") { test.run(std::make_unique(), 161, 48, test.getExampleInputPaths()); } } TEST_CASE("[CeresSearchTests]") { TestContext test; SECTION("FullData") { test.run(std::make_unique(), 2462, 1877, test.getInputPaths()); } SECTION("ExampleData") { test.run(std::make_unique(), 18, 9, test.getExampleInputPaths()); } } TEST_CASE("[PrintQueueTests]") { TestContext test; SECTION("FullData") { test.run(std::make_unique(), 5087, 4971, test.getInputPaths()); } SECTION("ExampleData") { test.run(std::make_unique(), 143, 123, test.getExampleInputPaths()); } } TEST_CASE("[GuardGallivantTests]") { TestContext test; SECTION("FullData") { test.run(std::make_unique(), 4665, 0, test.getInputPaths()); } SECTION("ExampleData") { test.run(std::make_unique(), 41, 0, test.getExampleInputPaths()); } } TEST_CASE("[BridgeRepairTests]") { TestContext test; SECTION("FullData") { test.run(std::make_unique(), 12839601725877, 149956401519484, test.getInputPaths()); } SECTION("ExampleData") { test.run(std::make_unique(), 3749, 11387, test.getExampleInputPaths()); } } TEST_CASE("[ResonantCollinearityTests]") { TestContext test; SECTION("FullData") { test.run(std::make_unique(), 426, 1359, test.getInputPaths()); } SECTION("ExampleData") { test.run(std::make_unique(), 14, 34, test.getExampleInputPaths()); } } TEST_CASE("[DiskFragmenterTests]") { TestContext test; SECTION("FullData") { test.run(std::make_unique(), 6401092019345, 6431472344710, test.getInputPaths()); } SECTION("ExampleData") { test.run(std::make_unique(), 1928, 2858, test.getExampleInputPaths()); } } TEST_CASE("[HoofItTests]") { TestContext test; SECTION("FullData") { test.run(std::make_unique(), 611, 1380, test.getInputPaths()); } SECTION("ExampleData") { test.run(std::make_unique(), 36, 81, test.getExampleInputPaths()); } } TEST_CASE("[PlutonianPebblesTests]") { TestContext test; SECTION("FullData") { test.run(std::make_unique(), 220999, 261936432123724, test.getInputPaths()); } SECTION("ExampleData") { test.run(std::make_unique(), 55312, 65601038650482, test.getExampleInputPaths()); } } TEST_CASE("[GardenGroupsTests]") { TestContext test; SECTION("FullData") { test.run(std::make_unique(), 1477762, 923480, test.getInputPaths()); } SECTION("ExampleData") { test.run(std::make_unique(), 1930, 1206, test.getExampleInputPaths()); } SECTION("ExampleData2") { test.run(std::make_unique(2), 140, 80, test.getExampleInputPaths()); } SECTION("ExampleData3") { test.run(std::make_unique(3), 772, 436, test.getExampleInputPaths()); } SECTION("ExampleData4") { test.runPart2(std::make_unique(4), 236, test.getExampleInputPaths()); } SECTION("ExampleData5") { test.runPart2(std::make_unique(5), 368, test.getExampleInputPaths()); } } TEST_CASE("[ClawContraptionTests]") { TestContext test; SECTION("FullData") { test.run(std::make_unique(), 36571, 0, test.getInputPaths()); } SECTION("ExampleData") { test.run(std::make_unique(), 480, 0, test.getExampleInputPaths()); } } TEST_CASE("[LanPartyTests]") { TestContext test; SECTION("FullData") { test.run(std::make_unique(), 1230, 0, test.getInputPaths()); } SECTION("ExampleData") { test.run(std::make_unique(), 7, 0, test.getExampleInputPaths()); } }