Implement Set, Refactor Map into Tree
This commit is contained in:
@@ -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/)
|
||||
@@ -0,0 +1,3 @@
|
||||
target_sources(SeeleUnitTests
|
||||
PRIVATE
|
||||
ComponentSystem.cpp)
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user