From 1a30c7bf49f9c6debb95fed84911d0568cc4899e Mon Sep 17 00:00:00 2001 From: Mircea TheHonestCTO Date: Fri, 3 Oct 2025 16:50:30 +0200 Subject: [PATCH] adjusted ResourceTraderTest.cpp after develop merge --- test/nullkiller2/Engine/ResourceTraderTest.cpp | 18 +++++++++--------- test/nullkiller2/Nulkiller2TestUtils.h | 3 +-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/test/nullkiller2/Engine/ResourceTraderTest.cpp b/test/nullkiller2/Engine/ResourceTraderTest.cpp index a4015b764..79c52f6cc 100644 --- a/test/nullkiller2/Engine/ResourceTraderTest.cpp +++ b/test/nullkiller2/Engine/ResourceTraderTest.cpp @@ -54,10 +54,10 @@ public: TEST(Nullkiller2_Engine_ResourceTrader, tradeHelper_crystalsToGold) { - const TResources missingNow01 = Nulkiller2TestUtils::res(0, 0, 0, 4000, 0, 0, 75000, 0); - const TResources missingNow02 = Nulkiller2TestUtils::res(0, 0, 0, 0, 0, 0, 10000, 0); - const TResources income = Nulkiller2TestUtils::res(2, 2, 2, 4000, 2, 2, 1000, 0); - const TResources freeAfterMissingTotal = Nulkiller2TestUtils::res(1000, 1000, 1000, 0, 1002, 1000, 0, 0); + const TResources missingNow01 = Nulkiller2TestUtils::res(0, 0, 0, 4000, 0, 0, 75000); + const TResources missingNow02 = Nulkiller2TestUtils::res(0, 0, 0, 0, 0, 0, 10000); + const TResources income = Nulkiller2TestUtils::res(2, 2, 2, 4000, 2, 2, 1000); + const TResources freeAfterMissingTotal = Nulkiller2TestUtils::res(1000, 1000, 1000, 0, 1002, 1000, 0); MockBuildAnalyzer ba; EXPECT_CALL(ba, isGoldPressureOverMax()).Times(0); @@ -80,13 +80,13 @@ TEST(Nullkiller2_Engine_ResourceTrader, tradeHelper_crystalsToGold) TEST(Nullkiller2_Engine_ResourceTrader, tradeHelper_goldToGems) { - const TResources missingNow01 = Nulkiller2TestUtils::res(0, 0, 0, 4000, 0, 200, 0, 0); - const TResources missingNow02 = Nulkiller2TestUtils::res(0, 0, 0, 4000, 0, 4, 0, 0); - const TResources income = Nulkiller2TestUtils::res(2, 2, 2, 4000, 2, 2, 1000, 0); - const TResources freeAfterMissingTotal = Nulkiller2TestUtils::res(100, 100, 100, 0, 0, 0, 100000, 0); + const TResources missingNow01 = Nulkiller2TestUtils::res(0, 0, 0, 4000, 0, 200, 0); + const TResources missingNow02 = Nulkiller2TestUtils::res(0, 0, 0, 4000, 0, 4, 0); + const TResources income = Nulkiller2TestUtils::res(2, 2, 2, 4000, 2, 2, 1000); + const TResources freeAfterMissingTotal = Nulkiller2TestUtils::res(100, 100, 100, 0, 0, 0, 100000); MockBuildAnalyzer ba; - EXPECT_CALL(ba, isGoldPressureOverMax()).Times(2).WillRepeatedly(testing::Return(false)); + EXPECT_CALL(ba, isGoldPressureOverMax()).Times(3).WillRepeatedly(testing::Return(false)); MockMarket m(1); MockMarket m20(20); // maxes out at 0.5 effectiveness anyway after 9 castles MockCCallback cc; diff --git a/test/nullkiller2/Nulkiller2TestUtils.h b/test/nullkiller2/Nulkiller2TestUtils.h index 93d4e3fef..ea3d01d16 100644 --- a/test/nullkiller2/Nulkiller2TestUtils.h +++ b/test/nullkiller2/Nulkiller2TestUtils.h @@ -13,7 +13,7 @@ class Nulkiller2TestUtils { public: static TResources - res(const int wood, const int mercury, const int ore, const int sulfur, const int crystals, const int gems, const int gold, const int mithril) + res(const int wood, const int mercury, const int ore, const int sulfur, const int crystals, const int gems, const int gold) { TResources resources; resources[0] = wood; @@ -23,7 +23,6 @@ public: resources[4] = crystals; resources[5] = gems; resources[6] = gold; - resources[7] = mithril; return resources; } }; \ No newline at end of file