Skip to content

Commit

Permalink
integration tests for barrier cells in dying state
Browse files Browse the repository at this point in the history
  • Loading branch information
chrxh committed Dec 4, 2024
1 parent 3f4b6a4 commit a377a89
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions source/EngineTests/LivingStateTransitionTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit a377a89

Please sign in to comment.