From 42ea76cf534e5d3eaa8f7de62413c3270e6b0e6c Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Fri, 24 Apr 2020 00:05:43 +0200 Subject: [PATCH] Fixed spelling error in AngelScriptResolver name. --- ...ipResolver.cpp => AngelScriptResolver.cpp} | 26 +++++++++---------- ...ipResolver.hpp => AngelScriptResolver.hpp} | 8 +++--- .../AngelScript/AngelScriptScript.cpp | 2 +- .../AngelScript/AngelScriptScript.hpp | 6 ++--- tests/ScriptTests/BaseScriptClassTests.cpp | 8 +++--- tests/ScriptTests/ScriptResolverTests.cpp | 12 ++++----- .../ScriptTypeTests/Battle/PokemonTests.cpp | 10 +++---- .../ScriptTypeTests/Library/FormesTests.cpp | 10 +++---- .../ScriptTypeTests/Library/ItemDataTests.cpp | 10 +++---- .../ScriptTypeTests/Library/MoveTests.cpp | 10 +++---- .../ScriptTypeTests/Library/SpeciesTests.cpp | 10 +++---- .../Library/StaticLibraryTests.cpp | 10 +++---- 12 files changed, 61 insertions(+), 61 deletions(-) rename src/ScriptResolving/AngelScript/{AngelScripResolver.cpp => AngelScriptResolver.cpp} (92%) rename src/ScriptResolving/AngelScript/{AngelScripResolver.hpp => AngelScriptResolver.hpp} (92%) diff --git a/src/ScriptResolving/AngelScript/AngelScripResolver.cpp b/src/ScriptResolving/AngelScript/AngelScriptResolver.cpp similarity index 92% rename from src/ScriptResolving/AngelScript/AngelScripResolver.cpp rename to src/ScriptResolving/AngelScript/AngelScriptResolver.cpp index 2e63a5f..1badc32 100644 --- a/src/ScriptResolving/AngelScript/AngelScripResolver.cpp +++ b/src/ScriptResolving/AngelScript/AngelScriptResolver.cpp @@ -1,4 +1,4 @@ -#include "AngelScripResolver.hpp" +#include "AngelScriptResolver.hpp" #include #include #include @@ -24,7 +24,7 @@ #include "TypeRegistry/Library/RegisterTypeLibrary.hpp" CreatureLib::Battling::ScriptResolver* PkmnLib::Battling::BattleLibrary::CreateScriptResolver() { - return new AngelScripResolver(); + return new AngelScriptResolver(); } static void TranslateException(asIScriptContext* ctx, void* /*userParam*/) { @@ -40,7 +40,7 @@ static void TranslateException(asIScriptContext* ctx, void* /*userParam*/) { } } -void AngelScripResolver::Initialize(CreatureLib::Battling::BattleLibrary* arg) { +void AngelScriptResolver::Initialize(CreatureLib::Battling::BattleLibrary* arg) { for (auto scriptCategory : ScriptCategoryHelper::GetValues()) { _typeDatabase.Insert(scriptCategory, {}); } @@ -88,7 +88,7 @@ void AngelScripResolver::Initialize(CreatureLib::Battling::BattleLibrary* arg) { _contextPool = new ContextPool(_engine); } -void AngelScripResolver::RegisterTypes() { +void AngelScriptResolver::RegisterTypes() { // Register static library types RegisterSpeciesTypes::Register(_engine); RegisterItemTypes::Register(_engine); @@ -113,7 +113,7 @@ void AngelScripResolver::RegisterTypes() { BasicScriptClass::Register(_engine); } -void AngelScripResolver::MessageCallback(const asSMessageInfo* msg, void* param) { +void AngelScriptResolver::MessageCallback(const asSMessageInfo* msg, void* param) { const char* type = "ERR "; if (msg->type == asMSGTYPE_WARNING) type = "WARN"; @@ -122,7 +122,7 @@ void AngelScripResolver::MessageCallback(const asSMessageInfo* msg, void* param) printf("%s (%d, %d) : %s : %s\n", msg->section, msg->row, msg->col, type, msg->message); } -CreatureLib::Battling::Script* AngelScripResolver::LoadScript(ScriptCategory category, const ConstString& scriptName) { +CreatureLib::Battling::Script* AngelScriptResolver::LoadScript(ScriptCategory category, const ConstString& scriptName) { Dictionary innerDb; if (!_typeDatabase.TryGet(category, innerDb)) { _typeDatabase.Insert(category, innerDb); @@ -141,7 +141,7 @@ CreatureLib::Battling::Script* AngelScripResolver::LoadScript(ScriptCategory cat _contextPool->ReturnContextToPool(ctx); return new AngelScriptScript(this, t, obj, _contextPool); } -void AngelScripResolver::FinalizeModule() { +void AngelScriptResolver::FinalizeModule() { int r = _builder.BuildModule(); if (r < 0) throw CreatureException("Building Script Module failed."); @@ -205,10 +205,10 @@ void AngelScripResolver::FinalizeModule() { } } } -void AngelScripResolver::CreateScript(const char* name, const char* script) { +void AngelScriptResolver::CreateScript(const char* name, const char* script) { _builder.AddSectionFromMemory(name, script); } -void AngelScripResolver::WriteByteCodeToFile(const char* file, bool stripDebugInfo) { +void AngelScriptResolver::WriteByteCodeToFile(const char* file, bool stripDebugInfo) { FILE* wFile = nullptr; wFile = fopen(file, "wb"); AssertNotNull(wFile); @@ -217,7 +217,7 @@ void AngelScripResolver::WriteByteCodeToFile(const char* file, bool stripDebugIn Assert(fclose(wFile) == 0); delete stream; } -void AngelScripResolver::LoadByteCodeFromFile( +void AngelScriptResolver::LoadByteCodeFromFile( const char* file, const Dictionary>& types) { FILE* rFile = nullptr; rFile = fopen(file, "rb"); @@ -227,7 +227,7 @@ void AngelScripResolver::LoadByteCodeFromFile( Assert(fclose(rFile) == 0); delete stream; } -uint8_t* AngelScripResolver::WriteByteCodeToMemory(size_t& size, bool stripDebugInfo) { +uint8_t* AngelScriptResolver::WriteByteCodeToMemory(size_t& size, bool stripDebugInfo) { auto stream = new MemoryByteCodeStream(); auto result = _mainModule->SaveByteCode(stream, stripDebugInfo); Assert(result == asSUCCESS); @@ -237,13 +237,13 @@ uint8_t* AngelScripResolver::WriteByteCodeToMemory(size_t& size, bool stripDebug delete stream; return arr; } -void AngelScripResolver::LoadByteCodeFromMemory( +void AngelScriptResolver::LoadByteCodeFromMemory( uint8_t* byte, size_t size, const Dictionary>& types) { auto stream = new MemoryByteCodeStream(byte, size); InitializeByteCode(stream, types); delete stream; } -void AngelScripResolver::InitializeByteCode( +void AngelScriptResolver::InitializeByteCode( asIBinaryStream* stream, const Dictionary>& types) { int result = _mainModule->LoadByteCode(stream); Assert(result == asSUCCESS); diff --git a/src/ScriptResolving/AngelScript/AngelScripResolver.hpp b/src/ScriptResolving/AngelScript/AngelScriptResolver.hpp similarity index 92% rename from src/ScriptResolving/AngelScript/AngelScripResolver.hpp rename to src/ScriptResolving/AngelScript/AngelScriptResolver.hpp index 858e773..bb5aae1 100644 --- a/src/ScriptResolving/AngelScript/AngelScripResolver.hpp +++ b/src/ScriptResolving/AngelScript/AngelScriptResolver.hpp @@ -1,5 +1,5 @@ -#ifndef PKMNLIB_ANGELSCRIPRESOLVER_HPP -#define PKMNLIB_ANGELSCRIPRESOLVER_HPP +#ifndef PKMNLIB_ANGELSCRIPTRESOLVER_HPP +#define PKMNLIB_ANGELSCRIPTRESOLVER_HPP #include #include "../../../extern/angelscript_addons/scriptbuilder/scriptbuilder.h" @@ -12,7 +12,7 @@ #include "AngelScriptTypeInfo.hpp" using namespace Arbutils::Collections; -class AngelScripResolver : public CreatureLib::Battling::ScriptResolver { +class AngelScriptResolver : public CreatureLib::Battling::ScriptResolver { private: asIScriptEngine* _engine = nullptr; asIScriptModule* _mainModule = nullptr; @@ -29,7 +29,7 @@ private: const Dictionary>& types); public: - ~AngelScripResolver() override { + ~AngelScriptResolver() override { delete _contextPool; for (const auto& category : _typeDatabase) { for (const auto& type : category.second) { diff --git a/src/ScriptResolving/AngelScript/AngelScriptScript.cpp b/src/ScriptResolving/AngelScript/AngelScriptScript.cpp index f80129b..f35476a 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptScript.cpp +++ b/src/ScriptResolving/AngelScript/AngelScriptScript.cpp @@ -1,5 +1,5 @@ #include "AngelScriptScript.hpp" -#include "AngelScripResolver.hpp" +#include "AngelScriptResolver.hpp" #define CALL_HOOK(name, setup) \ auto s = _type->Get##name(); \ diff --git a/src/ScriptResolving/AngelScript/AngelScriptScript.hpp b/src/ScriptResolving/AngelScript/AngelScriptScript.hpp index 82a9265..bb3d4e5 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptScript.hpp +++ b/src/ScriptResolving/AngelScript/AngelScriptScript.hpp @@ -10,17 +10,17 @@ #include "AngelScriptTypeInfo.hpp" #include "ContextPool.hpp" -class AngelScripResolver; +class AngelScriptResolver; class AngelScriptScript : public PkmnLib::Battling::PkmnScript { private: - AngelScripResolver* _resolver = nullptr; + AngelScriptResolver* _resolver = nullptr; AngelScriptTypeInfo* _type = nullptr; ContextPool* _ctxPool = nullptr; asIScriptObject* _obj = nullptr; CScriptArray* GetEffectParameters(const List& ls); public: - AngelScriptScript(AngelScripResolver* resolver, AngelScriptTypeInfo* type, asIScriptObject* obj, + AngelScriptScript(AngelScriptResolver* resolver, AngelScriptTypeInfo* type, asIScriptObject* obj, ContextPool* ctxPool) : _resolver(resolver), _type(type), _ctxPool(ctxPool), _obj(obj) {} diff --git a/tests/ScriptTests/BaseScriptClassTests.cpp b/tests/ScriptTests/BaseScriptClassTests.cpp index d484a0f..3e8a67b 100644 --- a/tests/ScriptTests/BaseScriptClassTests.cpp +++ b/tests/ScriptTests/BaseScriptClassTests.cpp @@ -1,7 +1,7 @@ #ifdef TESTS_BUILD #include "../../extern/catch.hpp" #include "../../src/Battling/Pokemon/CreatePokemon.hpp" -#include "../../src/ScriptResolving/AngelScript/AngelScripResolver.hpp" +#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp" #include "../TestLibrary/TestLibrary.hpp" #define AS_CLASS(name, contents) \ @@ -75,10 +75,10 @@ void StopBeforeAttack(ExecutingMove@ attack, bool& result) override{ }; -static AngelScripResolver* _resolverCache = nullptr; -static AngelScripResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* mainLib) { +static AngelScriptResolver* _resolverCache = nullptr; +static AngelScriptResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* mainLib) { if (_resolverCache == nullptr) { - _resolverCache = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); + _resolverCache = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); _resolverCache->Initialize(mainLib); for (auto kv : _scripts) { _resolverCache->CreateScript(kv.first, kv.second); diff --git a/tests/ScriptTests/ScriptResolverTests.cpp b/tests/ScriptTests/ScriptResolverTests.cpp index e37ebc1..cdaa02c 100644 --- a/tests/ScriptTests/ScriptResolverTests.cpp +++ b/tests/ScriptTests/ScriptResolverTests.cpp @@ -1,6 +1,6 @@ #ifdef TESTS_BUILD #include "../../extern/catch.hpp" -#include "../../src/ScriptResolving/AngelScript/AngelScripResolver.hpp" +#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp" #include "../TestLibrary/TestLibrary.hpp" static std::unordered_map _scripts = @@ -28,7 +28,7 @@ TEST_CASE("Get a script resolver, initialize it, then delete it") { } TEST_CASE("Get a script resolver, set script load function, load script, then build module") { - auto lib = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); + auto lib = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); lib->Initialize(TestLibrary::GetLibrary()); lib->CreateScript("testScript1", _scripts["testScript1"]); lib->FinalizeModule(); @@ -36,7 +36,7 @@ TEST_CASE("Get a script resolver, set script load function, load script, then bu } TEST_CASE("Build script resolver, then create object") { - auto lib = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); + auto lib = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); lib->Initialize(TestLibrary::GetLibrary()); lib->CreateScript("testScript1", _scripts["testScript1"]); lib->FinalizeModule(); @@ -48,7 +48,7 @@ TEST_CASE("Build script resolver, then create object") { } TEST_CASE("Build script resolver, create object, invoke addition method") { - auto lib = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); + auto lib = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); lib->Initialize(TestLibrary::GetLibrary()); lib->CreateScript("testScript1", _scripts["testScript1"]); lib->FinalizeModule(); @@ -79,7 +79,7 @@ TEST_CASE("Build script resolver, create object, invoke addition method") { } TEST_CASE("Get a script resolver, save the byte code to memory, create new script resolver from it") { - auto originLib = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); + auto originLib = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); originLib->Initialize(TestLibrary::GetLibrary()); originLib->CreateScript("testScript1", _scripts["testScript1"]); originLib->FinalizeModule(); @@ -97,7 +97,7 @@ TEST_CASE("Get a script resolver, save the byte code to memory, create new scrip types.Insert(innerDb.first, newInnerDb); } - auto newLib = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); + auto newLib = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); newLib->Initialize(TestLibrary::GetLibrary()); newLib->LoadByteCodeFromMemory(byteCode, size, types); auto obj = dynamic_cast(newLib->LoadScript(ScriptCategory::Creature, "testScript1"_cnc)); diff --git a/tests/ScriptTests/ScriptTypeTests/Battle/PokemonTests.cpp b/tests/ScriptTests/ScriptTypeTests/Battle/PokemonTests.cpp index d6ec2ca..6aef354 100644 --- a/tests/ScriptTests/ScriptTypeTests/Battle/PokemonTests.cpp +++ b/tests/ScriptTests/ScriptTypeTests/Battle/PokemonTests.cpp @@ -1,7 +1,7 @@ #ifdef TESTS_BUILD #include "../../../../extern/catch.hpp" #include "../../../../src/Battling/Pokemon/CreatePokemon.hpp" -#include "../../../../src/ScriptResolving/AngelScript/AngelScripResolver.hpp" +#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp" #include "../../../TestLibrary/TestLibrary.hpp" static std::unordered_map _scripts = @@ -32,7 +32,7 @@ class testScript1 { struct ScriptData { AngelScriptScript* Script = nullptr; - AngelScripResolver* Resolver = nullptr; + AngelScriptResolver* Resolver = nullptr; asIScriptFunction* Func = nullptr; asIScriptContext* Context = nullptr; @@ -42,10 +42,10 @@ struct ScriptData { } }; -static AngelScripResolver* _resolverCache = nullptr; -static AngelScripResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* mainLib) { +static AngelScriptResolver* _resolverCache = nullptr; +static AngelScriptResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* mainLib) { if (_resolverCache == nullptr) { - _resolverCache = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); + _resolverCache = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); _resolverCache->Initialize(mainLib); _resolverCache->CreateScript("testScript1" , _scripts["testScript1"]); _resolverCache->FinalizeModule(); diff --git a/tests/ScriptTests/ScriptTypeTests/Library/FormesTests.cpp b/tests/ScriptTests/ScriptTypeTests/Library/FormesTests.cpp index 03121e9..b23b00f 100644 --- a/tests/ScriptTests/ScriptTypeTests/Library/FormesTests.cpp +++ b/tests/ScriptTests/ScriptTypeTests/Library/FormesTests.cpp @@ -1,6 +1,6 @@ #ifdef TESTS_BUILD #include "../../../../extern/catch.hpp" -#include "../../../../src/ScriptResolving/AngelScript/AngelScripResolver.hpp" +#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp" #include "../../../TestLibrary/TestLibrary.hpp" static std::unordered_map _scripts = @@ -21,7 +21,7 @@ class testScript1 { struct ScriptData { AngelScriptScript* Script = nullptr; - AngelScripResolver* Resolver = nullptr; + AngelScriptResolver* Resolver = nullptr; asIScriptFunction* Func = nullptr; asIScriptContext* Context = nullptr; @@ -31,10 +31,10 @@ struct ScriptData { } }; -static AngelScripResolver* _resolverCache = nullptr; -static AngelScripResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* mainLib){ +static AngelScriptResolver* _resolverCache = nullptr; +static AngelScriptResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* mainLib){ if (_resolverCache == nullptr){ - _resolverCache = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); + _resolverCache = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); _resolverCache->Initialize(mainLib); _resolverCache->CreateScript("testScript1" , _scripts["testScript1"]); _resolverCache->FinalizeModule(); diff --git a/tests/ScriptTests/ScriptTypeTests/Library/ItemDataTests.cpp b/tests/ScriptTests/ScriptTypeTests/Library/ItemDataTests.cpp index 0d15a02..3fc6a39 100644 --- a/tests/ScriptTests/ScriptTypeTests/Library/ItemDataTests.cpp +++ b/tests/ScriptTests/ScriptTypeTests/Library/ItemDataTests.cpp @@ -1,6 +1,6 @@ #ifdef TESTS_BUILD #include "../../../../extern/catch.hpp" -#include "../../../../src/ScriptResolving/AngelScript/AngelScripResolver.hpp" +#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp" #include "../../../TestLibrary/TestLibrary.hpp" static std::unordered_map _scripts = @@ -17,7 +17,7 @@ class testScript1 { struct ScriptData { AngelScriptScript* Script = nullptr; - AngelScripResolver* Resolver = nullptr; + AngelScriptResolver* Resolver = nullptr; asIScriptFunction* Func = nullptr; asIScriptContext* Context = nullptr; @@ -27,10 +27,10 @@ struct ScriptData { } }; -static AngelScripResolver* _resolverCache = nullptr; -static AngelScripResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* mainLib){ +static AngelScriptResolver* _resolverCache = nullptr; +static AngelScriptResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* mainLib){ if (_resolverCache == nullptr){ - _resolverCache = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); + _resolverCache = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); _resolverCache->Initialize(mainLib); _resolverCache->CreateScript("testScript1" , _scripts["testScript1"]); _resolverCache->FinalizeModule(); diff --git a/tests/ScriptTests/ScriptTypeTests/Library/MoveTests.cpp b/tests/ScriptTests/ScriptTypeTests/Library/MoveTests.cpp index c65e3a6..397deb3 100644 --- a/tests/ScriptTests/ScriptTypeTests/Library/MoveTests.cpp +++ b/tests/ScriptTests/ScriptTypeTests/Library/MoveTests.cpp @@ -1,6 +1,6 @@ #ifdef TESTS_BUILD #include "../../../../extern/catch.hpp" -#include "../../../../src/ScriptResolving/AngelScript/AngelScripResolver.hpp" +#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp" #include "../../../TestLibrary/TestLibrary.hpp" static std::unordered_map _scripts = @@ -21,7 +21,7 @@ class testScript1 { struct ScriptData { AngelScriptScript* Script = nullptr; - AngelScripResolver* Resolver = nullptr; + AngelScriptResolver* Resolver = nullptr; asIScriptFunction* Func = nullptr; asIScriptContext* Context = nullptr; @@ -31,10 +31,10 @@ struct ScriptData { } }; -static AngelScripResolver* _resolverCache = nullptr; -static AngelScripResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* mainLib){ +static AngelScriptResolver* _resolverCache = nullptr; +static AngelScriptResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* mainLib){ if (_resolverCache == nullptr){ - _resolverCache = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); + _resolverCache = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); _resolverCache->Initialize(mainLib); _resolverCache->CreateScript("testScript1" , _scripts["testScript1"]); _resolverCache->FinalizeModule(); diff --git a/tests/ScriptTests/ScriptTypeTests/Library/SpeciesTests.cpp b/tests/ScriptTests/ScriptTypeTests/Library/SpeciesTests.cpp index 645945c..bdec5a3 100644 --- a/tests/ScriptTests/ScriptTypeTests/Library/SpeciesTests.cpp +++ b/tests/ScriptTests/ScriptTypeTests/Library/SpeciesTests.cpp @@ -1,6 +1,6 @@ #ifdef TESTS_BUILD #include "../../../../extern/catch.hpp" -#include "../../../../src/ScriptResolving/AngelScript/AngelScripResolver.hpp" +#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp" #include "../../../TestLibrary/TestLibrary.hpp" static std::unordered_map _scripts = @@ -19,7 +19,7 @@ class testScript1 { struct ScriptData { AngelScriptScript* Script; - AngelScripResolver* Resolver; + AngelScriptResolver* Resolver; asIScriptFunction* Func; asIScriptContext* Context; @@ -29,10 +29,10 @@ struct ScriptData { } }; -static AngelScripResolver* _resolverCache = nullptr; -static AngelScripResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* mainLib){ +static AngelScriptResolver* _resolverCache = nullptr; +static AngelScriptResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* mainLib){ if (_resolverCache == nullptr){ - _resolverCache = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); + _resolverCache = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); _resolverCache->Initialize(mainLib); _resolverCache->CreateScript("testScript1" , _scripts["testScript1"]); _resolverCache->FinalizeModule(); diff --git a/tests/ScriptTests/ScriptTypeTests/Library/StaticLibraryTests.cpp b/tests/ScriptTests/ScriptTypeTests/Library/StaticLibraryTests.cpp index b700ce6..52220fa 100644 --- a/tests/ScriptTests/ScriptTypeTests/Library/StaticLibraryTests.cpp +++ b/tests/ScriptTests/ScriptTypeTests/Library/StaticLibraryTests.cpp @@ -1,6 +1,6 @@ #ifdef TESTS_BUILD #include "../../../../extern/catch.hpp" -#include "../../../../src/ScriptResolving/AngelScript/AngelScripResolver.hpp" +#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp" #include "../../../TestLibrary/TestLibrary.hpp" static std::unordered_map _scripts = @@ -20,7 +20,7 @@ class testScript1 { struct ScriptData { AngelScriptScript* Script; - AngelScripResolver* Resolver; + AngelScriptResolver* Resolver; asIScriptFunction* Func; asIScriptContext* Context; @@ -30,10 +30,10 @@ struct ScriptData { } }; -static AngelScripResolver* _resolverCache = nullptr; -static AngelScripResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* mainLib){ +static AngelScriptResolver* _resolverCache = nullptr; +static AngelScriptResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* mainLib){ if (_resolverCache == nullptr){ - _resolverCache = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); + _resolverCache = dynamic_cast(PkmnLib::Battling::BattleLibrary::CreateScriptResolver()); _resolverCache->Initialize(mainLib); _resolverCache->CreateScript("testScript1" , _scripts["testScript1"]); _resolverCache->FinalizeModule();