mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
adjusted ResourceTraderTest.cpp after develop merge
This commit is contained in:
@@ -54,10 +54,10 @@ public:
|
|||||||
|
|
||||||
TEST(Nullkiller2_Engine_ResourceTrader, tradeHelper_crystalsToGold)
|
TEST(Nullkiller2_Engine_ResourceTrader, tradeHelper_crystalsToGold)
|
||||||
{
|
{
|
||||||
const TResources missingNow01 = Nulkiller2TestUtils::res(0, 0, 0, 4000, 0, 0, 75000, 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, 0);
|
const TResources missingNow02 = Nulkiller2TestUtils::res(0, 0, 0, 0, 0, 0, 10000);
|
||||||
const TResources income = Nulkiller2TestUtils::res(2, 2, 2, 4000, 2, 2, 1000, 0);
|
const TResources income = Nulkiller2TestUtils::res(2, 2, 2, 4000, 2, 2, 1000);
|
||||||
const TResources freeAfterMissingTotal = Nulkiller2TestUtils::res(1000, 1000, 1000, 0, 1002, 1000, 0, 0);
|
const TResources freeAfterMissingTotal = Nulkiller2TestUtils::res(1000, 1000, 1000, 0, 1002, 1000, 0);
|
||||||
|
|
||||||
MockBuildAnalyzer ba;
|
MockBuildAnalyzer ba;
|
||||||
EXPECT_CALL(ba, isGoldPressureOverMax()).Times(0);
|
EXPECT_CALL(ba, isGoldPressureOverMax()).Times(0);
|
||||||
@@ -80,13 +80,13 @@ TEST(Nullkiller2_Engine_ResourceTrader, tradeHelper_crystalsToGold)
|
|||||||
|
|
||||||
TEST(Nullkiller2_Engine_ResourceTrader, tradeHelper_goldToGems)
|
TEST(Nullkiller2_Engine_ResourceTrader, tradeHelper_goldToGems)
|
||||||
{
|
{
|
||||||
const TResources missingNow01 = Nulkiller2TestUtils::res(0, 0, 0, 4000, 0, 200, 0, 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, 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, 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, 0);
|
const TResources freeAfterMissingTotal = Nulkiller2TestUtils::res(100, 100, 100, 0, 0, 0, 100000);
|
||||||
|
|
||||||
MockBuildAnalyzer ba;
|
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 m(1);
|
||||||
MockMarket m20(20); // maxes out at 0.5 effectiveness anyway after 9 castles
|
MockMarket m20(20); // maxes out at 0.5 effectiveness anyway after 9 castles
|
||||||
MockCCallback cc;
|
MockCCallback cc;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class Nulkiller2TestUtils
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static TResources
|
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;
|
TResources resources;
|
||||||
resources[0] = wood;
|
resources[0] = wood;
|
||||||
@@ -23,7 +23,6 @@ public:
|
|||||||
resources[4] = crystals;
|
resources[4] = crystals;
|
||||||
resources[5] = gems;
|
resources[5] = gems;
|
||||||
resources[6] = gold;
|
resources[6] = gold;
|
||||||
resources[7] = mithril;
|
|
||||||
return resources;
|
return resources;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user