Fix tests for GetAllEnchantsAffectingAbility. Release Build 12194.
Some checks failed
Emscripten Build / Build_and_Deploy_Web_Build (push) Has been cancelled
Some checks failed
Emscripten Build / Build_and_Deploy_Web_Build (push) Has been cancelled
This commit is contained in:
parent
38d72e24a1
commit
2fea77c66c
@ -140,17 +140,21 @@ namespace EnchantTests
|
||||
const Class cl{Class(classBits)};
|
||||
Game::ChangeClass(player,cl);
|
||||
for(const Ability&ability:player->GetAbilities()){
|
||||
Assert::AreEqual(size_t(0),ItemEnchantInfo::GetAllEnchantsAffectingAbility("Rapid Fire").size(),util::wformat("There should be no enchants affecting ability {} by default.",ability).c_str());
|
||||
Assert::AreEqual(size_t(0),ItemEnchantInfo::GetAllEnchantsAffectingAbility(ability.GetName()).size(),util::wformat("There should be no enchants affecting ability {} by default.",ability.GetName()).c_str());
|
||||
}
|
||||
}
|
||||
Game::GiveAndEquipEnchantedRing("Stealthy Retreat");
|
||||
Assert::AreEqual(size_t(1),ItemEnchantInfo::GetAllEnchantsAffectingAbility("Retreat").size(),L"There should be 1 enchant affecting ability Retreat.");
|
||||
Game::GiveAndEquipEnchantedRing("Stealthy Retreat",EquipSlot::RING2);
|
||||
Assert::AreEqual(size_t(2),ItemEnchantInfo::GetAllEnchantsAffectingAbility("Retreat").size(),L"There should be 2 enchants affecting ability Retreat.");
|
||||
Game::GiveAndEquipEnchantedRing("Heavy Guard");
|
||||
Assert::AreEqual(size_t(1),ItemEnchantInfo::GetAllEnchantsAffectingAbility("Block").size(),L"There should be 1 enchant affecting ability Block.");
|
||||
Game::GiveAndEquipEnchantedRing("Advance Shield",EquipSlot::RING2);
|
||||
Assert::AreEqual(size_t(2),ItemEnchantInfo::GetAllEnchantsAffectingAbility("Block").size(),L"There should be 2 enchants affecting ability Block.");
|
||||
Inventory::UnequipItem(EquipSlot::RING1);
|
||||
Assert::AreEqual(size_t(1),ItemEnchantInfo::GetAllEnchantsAffectingAbility("Retreat").size(),L"There should be 1 enchant affecting ability Retreat.");
|
||||
Assert::AreEqual(size_t(1),ItemEnchantInfo::GetAllEnchantsAffectingAbility("Block").size(),L"There should be 1 enchant affecting ability Block.");
|
||||
Game::GiveAndEquipEnchantedRing("Advance Shield");
|
||||
Assert::AreEqual(size_t(1),ItemEnchantInfo::GetAllEnchantsAffectingAbility("Block").size(),L"With two of the same enchant, there should only be 1 enchant enchants affecting ability Block.");
|
||||
Inventory::UnequipItem(EquipSlot::RING2);
|
||||
Assert::AreEqual(size_t(0),ItemEnchantInfo::GetAllEnchantsAffectingAbility("Retreat").size(),L"There should be no enchants affecting ability Retreat by default.");
|
||||
Assert::AreEqual(size_t(1),ItemEnchantInfo::GetAllEnchantsAffectingAbility("Block").size(),L"There should be 1 enchant affecting ability Block.");
|
||||
Inventory::UnequipItem(EquipSlot::RING1);
|
||||
Assert::AreEqual(size_t(0),ItemEnchantInfo::GetAllEnchantsAffectingAbility("Block").size(),L"There should be no enchants affecting ability Block by default.");
|
||||
}
|
||||
TEST_METHOD(HealthBoostCheck){
|
||||
Assert::AreEqual(100,player->GetMaxHealth(),L"Player starts with 100 health.");
|
||||
|
@ -714,12 +714,12 @@
|
||||
<ClInclude Include="Arc.h">
|
||||
<Filter>Header Files\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Entity.h">
|
||||
<Filter>Header Files\Utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="State_Arena.h">
|
||||
<Filter>Header Files\State</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Entity.h">
|
||||
<Filter>Header Files\State</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Player.cpp">
|
||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 3
|
||||
#define VERSION_PATCH 0
|
||||
#define VERSION_BUILD 12193
|
||||
#define VERSION_BUILD 12194
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
Loading…
x
Reference in New Issue
Block a user