EtrediaEmpires/ECSAPI/ECS/test/test_conf.hpp
legatt 32f4597c4d Base frontend module
- Naming style migrated to camel-case
- P7lib logger sources added
- Vcpkg manifest, CMake presets and build moved to root
- SDL2, Vulkan and RmlUi dependencies added
- Logger LOG macro added
- Logger  configuration
- SDL2 window configuration
- Vulkan configuration
- RmlUi configuration
- SDL event loop
2025-08-08 00:07:32 +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()
{
}
};