19 lines
457 B
C++
19 lines
457 B
C++
#ifdef TESTS_BUILD
|
|
#include "../../extern/doctest.hpp"
|
|
#include "../../src/Library/BaseLibrary.hpp"
|
|
#include "../TestLibrary/TestLibrary.hpp"
|
|
|
|
using namespace CreatureLib::Library;
|
|
TEST_CASE("Iterate over library") {
|
|
auto& lib = TestLibrary::Get()->GetSpeciesLibrary();
|
|
auto i = 0;
|
|
for (auto b : *lib) {
|
|
if (i == 0) {
|
|
CHECK(b.second->GetName() == "testSpecies1"_cnc);
|
|
}
|
|
i++;
|
|
}
|
|
CHECK(i == 1);
|
|
}
|
|
|
|
#endif |