Link to library we use for stacktraces.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
b5a1d74bdb
commit
cd4893936e
|
@ -75,6 +75,10 @@ add_library(pkmnLib ${LIBTYPE} ${CORE_SRC_FILES})
|
||||||
|
|
||||||
SET(_LINKS CreatureLib Arbutils)
|
SET(_LINKS CreatureLib Arbutils)
|
||||||
SET(_TESTLINKS pkmnLib CreatureLib Arbutils)
|
SET(_TESTLINKS pkmnLib CreatureLib Arbutils)
|
||||||
|
if (NOT WINDOWS)
|
||||||
|
set(_LINKS ${_LINKS} -lbfd -ldl)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
if (SCRIPT_PROVIDER STREQUAL "angelscript")
|
if (SCRIPT_PROVIDER STREQUAL "angelscript")
|
||||||
message(STATUS "Using Angelscript as script provider.")
|
message(STATUS "Using Angelscript as script provider.")
|
||||||
|
|
|
@ -49,8 +49,8 @@ namespace PkmnLib::Battling {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CreatePokemon(const BattleLibrary* library, const ArbUt::StringView& species, uint8_t level)
|
CreatePokemon(const BattleLibrary* library, const ArbUt::StringView& species, uint8_t level)
|
||||||
: _library(library), _species(species), _level(level), _attacks(library->GetSettings()->GetMaximalAttacks()) {
|
: _library(library), _species(species), _level(level),
|
||||||
}
|
_attacks(library->GetSettings()->GetMaximalAttacks()) {}
|
||||||
|
|
||||||
CreatePokemon& WithForme(const ArbUt::StringView& forme);
|
CreatePokemon& WithForme(const ArbUt::StringView& forme);
|
||||||
CreatePokemon& WithGender(CreatureLib::Library::Gender gender);
|
CreatePokemon& WithGender(CreatureLib::Library::Gender gender);
|
||||||
|
|
|
@ -344,10 +344,9 @@ TEST_CASE("Handle script exceptions.") {
|
||||||
auto mainLib = TestLibrary::GetLibrary();
|
auto mainLib = TestLibrary::GetLibrary();
|
||||||
auto script = GetScript(mainLib, "throwScript"_cnc);
|
auto script = GetScript(mainLib, "throwScript"_cnc);
|
||||||
REQUIRE(script != nullptr);
|
REQUIRE(script != nullptr);
|
||||||
try{
|
try {
|
||||||
TryException(script);
|
TryException(script);
|
||||||
}
|
} catch (const ArbUt::Exception& e) {
|
||||||
catch (const ArbUt::Exception& e){
|
|
||||||
REQUIRE(strcmp(e.what(), "Script exception in script 'throwScript', line 1. Message: 'test exception'.") == 0);
|
REQUIRE(strcmp(e.what(), "Script exception in script 'throwScript', line 1. Message: 'test exception'.") == 0);
|
||||||
delete script;
|
delete script;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue