Angelscript support for ConstString.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -17,7 +17,7 @@ class testScript1 {
|
||||
bool testHeldItem(Pokemon@ p, Item@ item){ return p.HeldItem is item; }
|
||||
bool testCurrentHealth(Pokemon@ p, uint health){ return p.CurrentHealth == health; }
|
||||
bool testNickname(Pokemon@ p, const string& name){ return p.Nickname == name; }
|
||||
bool testActiveAbility(Pokemon@ p, const string &in ability){ return p.ActiveAbility == ability; }
|
||||
bool testActiveAbility(Pokemon@ p, const constString &in ability){ return p.ActiveAbility == ability; }
|
||||
bool testIsFainted(Pokemon@ p, bool b){ return p.IsFainted == b; }
|
||||
bool testType(Pokemon@ p, uint index, uint8 type){ return p.GetTypes()[index] == type; }
|
||||
bool testHasType(Pokemon@ p, uint8 type){ return p.HasType(type); }
|
||||
|
||||
@@ -166,7 +166,7 @@ TEST_CASE("Validate Forme GetAbility in Script") {
|
||||
auto ability = forme->GetAbility(CreatureLib::Library::TalentIndex(false, 0));
|
||||
data.Context->SetArgAddress(1, &ability);
|
||||
REQUIRE(data.Context->Execute() == asEXECUTION_FINISHED);
|
||||
// REQUIRE((bool)data.Context->GetReturnWord());
|
||||
REQUIRE((bool)data.Context->GetReturnWord());
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -7,7 +7,7 @@ static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
namespace Pokemon{
|
||||
class testScript1 {
|
||||
bool testName(const Item@ i, const string &in name){ return i.Name == name; }
|
||||
bool testName(const Item@ i, const constString &in name){ return i.Name == name; }
|
||||
bool testCategory(const Item@ i, ItemCategory category){ return i.Category == category; }
|
||||
bool testBattleCategory(const Item@ i, BattleItemCategory category){ return i.BattleCategory == category; }
|
||||
bool testPrice(const Item@ i, int price){ return i.Price == price; }
|
||||
|
||||
@@ -7,7 +7,7 @@ static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
namespace Pokemon{
|
||||
class testScript1 {
|
||||
bool testName(const MoveData@ s, const string &in name){ return s.Name == name; }
|
||||
bool testName(const MoveData@ s, const constString &in name){ return s.Name == name; }
|
||||
bool testType(const MoveData@ s, uint8 type){ return s.Type == type; }
|
||||
bool testCategory(const MoveData@ s, MoveCategory category){ return s.Category == category; }
|
||||
bool testBasePower(const MoveData@ s, uint8 basePower){ return s.BasePower == basePower; }
|
||||
|
||||
Reference in New Issue
Block a user