From a377a89d3ff5ce8b30c66c3dd0dabdf88a74eb86 Mon Sep 17 00:00:00 2001 From: Christian Heinemann Date: Wed, 4 Dec 2024 22:04:28 +0100 Subject: [PATCH] integration tests for barrier cells in dying state --- .../EngineTests/LivingStateTransitionTests.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/EngineTests/LivingStateTransitionTests.cpp b/source/EngineTests/LivingStateTransitionTests.cpp index 415cabf90..6ff610027 100644 --- a/source/EngineTests/LivingStateTransitionTests.cpp +++ b/source/EngineTests/LivingStateTransitionTests.cpp @@ -218,3 +218,19 @@ TEST_P(LivingStateTransitionTests, underConstruction_activating) EXPECT_EQ(LivingState_Activating, getCell(actualData, 1).livingState); EXPECT_EQ(LivingState_Ready, getCell(actualData, 2).livingState); } + +TEST_P(LivingStateTransitionTests, noDyingForBarrierCells) +{ + _parameters.cellDeathConsequences = GetParam(); + _simulationFacade->setSimulationParameters(_parameters); + + DataDescription data; + data.addCells({ + CellDescription().setId(1).setBarrier(true).setPos({10.0f, 10.0f}).setMaxConnections(1).setLivingState(LivingState_Dying), + }); + + _simulationFacade->setSimulationData(data); + _simulationFacade->calcTimesteps(1); + auto actualData = _simulationFacade->getSimulationData(); + EXPECT_EQ(LivingState_Ready, getCell(actualData, 1).livingState); +}