Update to new Arbutils
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:
@@ -9,11 +9,11 @@ using namespace CreatureLib::Battling;
|
||||
|
||||
class TestScript : public Script {
|
||||
private:
|
||||
ArbUt::CaseInsensitiveConstString _name;
|
||||
ArbUt::StringView _name;
|
||||
|
||||
public:
|
||||
explicit TestScript(std::string name) : _name(std::move(name)){};
|
||||
const ArbUt::CaseInsensitiveConstString& GetName() const noexcept override { return _name; }
|
||||
const ArbUt::StringView& GetName() const noexcept override { return _name; }
|
||||
|
||||
void TestMethod(int& runCount) { runCount++; }
|
||||
};
|
||||
|
||||
@@ -9,11 +9,11 @@ using namespace CreatureLib::Battling;
|
||||
|
||||
class TestScript : public Script {
|
||||
private:
|
||||
ArbUt::CaseInsensitiveConstString _name;
|
||||
ArbUt::StringView _name;
|
||||
|
||||
public:
|
||||
explicit TestScript(std::string name) : _name(std::move(name)){};
|
||||
const ArbUt::CaseInsensitiveConstString& GetName() const noexcept override { return _name; }
|
||||
const ArbUt::StringView& GetName() const noexcept override { return _name; }
|
||||
};
|
||||
|
||||
TEST_CASE("Empty script set count == 0", "[Battling, Scripting]") {
|
||||
|
||||
@@ -10,11 +10,11 @@ using namespace CreatureLib::Battling;
|
||||
|
||||
class TestScript : public Script {
|
||||
private:
|
||||
ArbUt::CaseInsensitiveConstString _name;
|
||||
ArbUt::StringView _name;
|
||||
|
||||
public:
|
||||
explicit TestScript(std::string name) : _name(std::move(name)){};
|
||||
const ArbUt::CaseInsensitiveConstString& GetName() const noexcept override { return _name; }
|
||||
const ArbUt::StringView& GetName() const noexcept override { return _name; }
|
||||
|
||||
void TestMethod(int& runCount) { runCount++; }
|
||||
};
|
||||
|
||||
@@ -232,23 +232,23 @@ TEST_CASE("Switch Creature in, mark as seen opponent for opponent", "[Integratio
|
||||
|
||||
auto seen = c3->GetSeenOpponents();
|
||||
REQUIRE(seen.size() == 1);
|
||||
REQUIRE(seen.find(c1) != seen.end());
|
||||
REQUIRE(seen.contains(c1));
|
||||
|
||||
battle.TrySetChoice(new SwitchTurnChoice(c1, c2));
|
||||
battle.TrySetChoice(new PassTurnChoice(c3));
|
||||
|
||||
seen = c3->GetSeenOpponents();
|
||||
REQUIRE(seen.size() == 2);
|
||||
REQUIRE(seen.find(c1) != seen.end());
|
||||
REQUIRE(seen.find(c2) != seen.end());
|
||||
REQUIRE(seen.contains(c1));
|
||||
REQUIRE(seen.contains(c2));
|
||||
|
||||
battle.TrySetChoice(new SwitchTurnChoice(c2, c1));
|
||||
battle.TrySetChoice(new PassTurnChoice(c3));
|
||||
|
||||
seen = c3->GetSeenOpponents();
|
||||
REQUIRE(seen.size() == 2);
|
||||
REQUIRE(seen.find(c1) != seen.end());
|
||||
REQUIRE(seen.find(c2) != seen.end());
|
||||
REQUIRE(seen.contains(c1));
|
||||
REQUIRE(seen.contains(c2));
|
||||
}
|
||||
|
||||
TEST_CASE("Flee Battle", "[Integrations]") {
|
||||
|
||||
@@ -17,7 +17,7 @@ TEST_CASE("Int EffectParameter", "[Library]") {
|
||||
}
|
||||
|
||||
TEST_CASE("String EffectParameter", "[Library]") {
|
||||
auto p = EffectParameter((ArbUt::CaseInsensitiveConstString) "foobar"_cnc);
|
||||
auto p = EffectParameter((ArbUt::StringView) "foobar"_cnc);
|
||||
REQUIRE(p.AsString() == "foobar");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user