Switch to doctest over Catch for unit tests.
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:
@@ -1,5 +1,5 @@
|
||||
#ifdef TESTS_BUILD
|
||||
#include "../../extern/catch.hpp"
|
||||
#include "../../extern/doctest.hpp"
|
||||
#include "../../src/Battling/Pokemon/CreatePokemon.hpp"
|
||||
#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../TestLibrary/TestLibrary.hpp"
|
||||
@@ -277,7 +277,7 @@ TEST_CASE("Invoke ChangeEffectiveness script function") {
|
||||
REQUIRE(script != nullptr);
|
||||
float b = 0;
|
||||
script->ChangeEffectiveness(nullptr, nullptr, 0, &b);
|
||||
REQUIRE(b == Approx(0.75));
|
||||
REQUIRE(b == doctest::Approx(0.75));
|
||||
|
||||
delete script;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifdef TESTS_BUILD
|
||||
#include "../../extern/catch.hpp"
|
||||
#include "../../extern/doctest.hpp"
|
||||
#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifdef TESTS_BUILD
|
||||
#include "../../../../extern/catch.hpp"
|
||||
#include "../../../../extern/doctest.hpp"
|
||||
#include "../../../../src/Battling/Pokemon/CreatePokemon.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifdef TESTS_BUILD
|
||||
#include "../../../../extern/catch.hpp"
|
||||
#include "../../../../extern/doctest.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifdef TESTS_BUILD
|
||||
#include "../../../../extern/catch.hpp"
|
||||
#include "../../../../extern/doctest.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifdef TESTS_BUILD
|
||||
#include "../../../../extern/catch.hpp"
|
||||
#include "../../../../extern/doctest.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
@@ -92,7 +92,7 @@ TEST_CASE("Validate Move Category in Script") {
|
||||
data.Context->SetArgDWord(1, (asDWORD)move->GetCategory());
|
||||
|
||||
auto result = data.Context->Execute();
|
||||
INFO("exception: " << data.Context->GetExceptionString())
|
||||
INFO("exception: " << data.Context->GetExceptionString());
|
||||
REQUIRE(result == asEXECUTION_FINISHED);
|
||||
REQUIRE((bool)data.Context->GetReturnByte());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifdef TESTS_BUILD
|
||||
#include "../../../../extern/catch.hpp"
|
||||
#include "../../../../extern/doctest.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifdef TESTS_BUILD
|
||||
#include "../../../../extern/catch.hpp"
|
||||
#include "../../../../extern/doctest.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user