Style fixes for tests
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2022-06-07 23:35:28 +02:00
parent a05a9ac76d
commit 09773be617
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
12 changed files with 11 additions and 16 deletions

View File

@ -8,7 +8,6 @@ TEST_CASE("Able to build and destroy empty library") {
delete lib;
}
REGISTER_EXCEPTION_TRANSLATOR(ArbUt::Exception& ex) {
return {(std::string(ex.what()) + "\n" + ex.GetStacktrace()).c_str()};
}

View File

@ -2,6 +2,4 @@
#include <doctest.h>
#include "../../src/Library/Species/PokemonSpecies.hpp"
#endif

View File

@ -1,14 +1,12 @@
#if TESTS_BUILD and ANGELSCRIPT
#include <doctest.h>
#include "../../TestLibrary/TestLibrary.hpp"
#include "../../src/Battling/Pokemon/CreatePokemon.hpp"
#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
#include "../../src/ScriptResolving/AngelScript/ContextPool.hpp"
#include "../../TestLibrary/TestLibrary.hpp"
#define AS_CLASS(name, contents) \
{ \
#name, "namespace Pokemon{ [Pokemon effect=" #name "] shared class " #name " : PkmnScript { " contents "}}" \
}
{ #name, "namespace Pokemon{ [Pokemon effect=" #name "] shared class " #name " : PkmnScript { " contents "}}" }
static std::unordered_map<const char*, const char*> _scripts = std::unordered_map<const char*, const char*>{
AS_CLASS(blankScript, ),

View File

@ -1,8 +1,8 @@
#if TESTS_BUILD and ANGELSCRIPT
#include <doctest.h>
#include "../../TestLibrary/TestLibrary.hpp"
#include "../../src/Battling/Pokemon/CreatePokemon.hpp"
#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
#include "../../TestLibrary/TestLibrary.hpp"
#define AS_CLASS(name, contents) \
{ #name, "namespace Pokemon{ [ItemUse effect=" #name "] class " #name " : ItemUseScript { " contents "}}" }

View File

@ -1,9 +1,9 @@
#if TESTS_BUILD and ANGELSCRIPT
#include <doctest.h>
#include "../../TestLibrary/TestLibrary.hpp"
#include "../../src/Battling/Pokemon/CreatePokemon.hpp"
#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
#include "../../src/ScriptResolving/AngelScript/ContextPool.hpp"
#include "../../TestLibrary/TestLibrary.hpp"
static std::unordered_map<const char*, const char*> _scripts =
std::unordered_map<const char*, const char*>{{"basic_ownership_test",

View File

@ -1,10 +1,10 @@
#if TESTS_BUILD and ANGELSCRIPT
#include <doctest.h>
#include "../../../../TestLibrary/TestLibrary.hpp"
#include "../../../../src/Battling/Battle/Battle.hpp"
#include "../../../../src/Battling/Pokemon/CreatePokemon.hpp"
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
#include "../../../../src/ScriptResolving/AngelScript/ContextPool.hpp"
#include "../../../../TestLibrary/TestLibrary.hpp"
static std::unordered_map<const char*, const char*> _scripts =
std::unordered_map<const char*, const char*>{{"testScript1", R"(

View File

@ -1,9 +1,9 @@
#if TESTS_BUILD and ANGELSCRIPT
#include <doctest.h>
#include "../../../../TestLibrary/TestLibrary.hpp"
#include "../../../../src/Battling/Pokemon/CreatePokemon.hpp"
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
#include "../../../../src/ScriptResolving/AngelScript/ContextPool.hpp"
#include "../../../../TestLibrary/TestLibrary.hpp"
static std::unordered_map<const char*, const char*> _scripts =
std::unordered_map<const char*, const char*>{{"testScript1", R"(

View File

@ -1,8 +1,8 @@
#if TESTS_BUILD and ANGELSCRIPT
#include <doctest.h>
#include "../../../../TestLibrary/TestLibrary.hpp"
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
#include "../../../../src/ScriptResolving/AngelScript/ContextPool.hpp"
#include "../../../../TestLibrary/TestLibrary.hpp"
static std::unordered_map<const char*, const char*> _scripts =
std::unordered_map<const char*, const char*>{{"testScript1", R"(

View File

@ -1,8 +1,8 @@
#if TESTS_BUILD and ANGELSCRIPT
#include <doctest.h>
#include "../../../../TestLibrary/TestLibrary.hpp"
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
#include "../../../../src/ScriptResolving/AngelScript/ContextPool.hpp"
#include "../../../../TestLibrary/TestLibrary.hpp"
static std::unordered_map<const char*, const char*> _scripts =
std::unordered_map<const char*, const char*>{{"testScript1", R"(

View File

@ -1,8 +1,8 @@
#if TESTS_BUILD and ANGELSCRIPT
#include <doctest.h>
#include "../../../../TestLibrary/TestLibrary.hpp"
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
#include "../../../../src/ScriptResolving/AngelScript/ContextPool.hpp"
#include "../../../../TestLibrary/TestLibrary.hpp"
static std::unordered_map<const char*, const char*> _scripts =
std::unordered_map<const char*, const char*>{{"testScript1", R"(

View File

@ -1,8 +1,8 @@
#if TESTS_BUILD && ANGELSCRIPT
#include <doctest.h>
#include "../../../../TestLibrary/TestLibrary.hpp"
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
#include "../../../../src/ScriptResolving/AngelScript/ContextPool.hpp"
#include "../../../../TestLibrary/TestLibrary.hpp"
static std::unordered_map<const char*, const char*> _scripts =
std::unordered_map<const char*, const char*>{{"testScript1", R"(

View File

@ -1,8 +1,8 @@
#if TESTS_BUILD and ANGELSCRIPT
#include <doctest.h>
#include "../../../../TestLibrary/TestLibrary.hpp"
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
#include "../../../../src/ScriptResolving/AngelScript/ContextPool.hpp"
#include "../../../../TestLibrary/TestLibrary.hpp"
static std::unordered_map<const char*, const char*> _scripts =
std::unordered_map<const char*, const char*>{{"testScript1", R"(