CreatureLib/tests/LibraryTests/SpeciesTest.cpp

17 lines
562 B
C++
Raw Normal View History

#ifdef TESTS_BUILD
2022-02-05 12:59:15 +00:00
#include <doctest.h>
#include "../../src/Library/CreatureData/CreatureSpecies.hpp"
using namespace CreatureLib::Library;
TEST_CASE("Set Variant") {
auto defaultVariant =
new SpeciesVariant("default", 0, 0, 0, {0, 1}, StatisticSet<u16>(), {}, {}, new LearnableAttacks(0));
auto c = CreatureSpecies(0, "foo", defaultVariant, 0, "", 0);
auto secondVariant =
new SpeciesVariant("second", 0, 0, 0, {0, 1}, StatisticSet<u16>(), {}, {}, new LearnableAttacks(0));
c.SetVariant("second"_cnc, secondVariant);
}
#endif