EtrediaEmpires/ECSAPI/ECS/test/test_conf.hpp
legatt 7ad2ec4dc8 Shaders assets and loading fix
- a = { ... } definitions replaced with a { ... }
- GetOverlappedResult replaced with waiting for event in Windows async file loading
- FileHandles and AssetHandles stored in heap for container element adresses consistence
- Shader assets examples
2025-08-24 14:56:17 +03:00

36 lines
1.1 KiB
C++

#pragma once
#include <gtest/gtest.h>
#include <ee_ecs/ecs.hpp>
struct WorldBenchmark : testing::Test
{
ee_ecs::World world;
void SetUp()
{
for (int16_t i = 0; i < 1000; i++)
{
ee_economy::Container resources {.capacity = 100.0};
resources.add(ee_economy::RESOURCE_TYPE::COAL, 100.0);
entt::entity state = world.registerState(i, resources);
ee_economy::EnterpriseDefaults miner {
.container {.capacity = 100.0},
.resourceTarget = ee_economy::RESOURCE_TYPE::GOLD,
.baseEfficiency = 1.0
};
world.spawnEnterprise(false, ee_economy::ACTION_TYPE::MINING, state, miner);
world.spawnEnterprise(false, ee_economy::ACTION_TYPE::MINING, state, miner);
world.spawnEnterprise(false, ee_economy::ACTION_TYPE::MINING, state, miner);
world.spawnEnterprise(false, ee_economy::ACTION_TYPE::MINING, state, miner);
world.spawnEnterprise(false, ee_economy::ACTION_TYPE::MINING, state, miner);
}
}
void TearDown()
{
}
};