Implement Set, Refactor Map into Tree

This commit is contained in:
Dynamitos
2023-12-22 19:46:07 +01:00
parent ac1d11402e
commit c8f99bb64d
20 changed files with 674 additions and 603 deletions
+2 -1
View File
@@ -7,4 +7,5 @@ target_include_directories(SeeleUnitTests PUBLIC ./)
add_subdirectory(Containers/)
add_subdirectory(Graphics/)
add_subdirectory(Math/)
add_subdirectory(Serialization/)
add_subdirectory(Serialization/)
add_subdirectory(System/)
+3
View File
@@ -0,0 +1,3 @@
target_sources(SeeleUnitTests
PRIVATE
ComponentSystem.cpp)
+9
View File
@@ -0,0 +1,9 @@
#include "EngineTest.h"
#include "Component/Component.h"
#include "Component/Transform.h"
#include "Component/Camera.h"
#include "Component/DirectionalLight.h"
#include "System/ComponentSystem.h"
using namespace Seele;
using namespace Seele::System;
+2 -3
View File
@@ -8,14 +8,13 @@ TEST(ThreadPool, RunBatch)
uint32 test = 20;
std::mutex m;
List<std::function<void()>> work;
for (uint32 i = 0; i < 400; ++i)
for (uint32 i = 0; i < 40000; ++i)
{
work.add([&]() {
std::unique_lock l(m);
std::this_thread::sleep_for(std::chrono::milliseconds(10));
test++;
});
}
t.runAndWait(std::move(work));
ASSERT_EQ(test, 420);
ASSERT_EQ(test, 40020);
}