diff --git a/source/EngineTests/TransmitterTests.cpp b/source/EngineTests/TransmitterTests.cpp index 24fc60cd0..e57a73153 100644 --- a/source/EngineTests/TransmitterTests.cpp +++ b/source/EngineTests/TransmitterTests.cpp @@ -412,61 +412,3 @@ TEST_F(TransmitterTests, distributeToReadyConstructors) EXPECT_TRUE(approxCompare(getEnergy(data), getEnergy(actualData))); } - -TEST_F(TransmitterTests, distributeFromNotReadyToReadyConstructors) -{ - _parameters.cellFunctionConstructorCheckCompletenessForSelfReplication = true; - _simulationFacade->setSimulationParameters(_parameters); - - auto subgenome = GenomeDescription().setCells({CellGenomeDescription()}); - - auto genome = GenomeDescription().setCells({ - CellGenomeDescription().setCellFunction(ConstructorGenomeDescription().setMakeSelfCopy()), - CellGenomeDescription().setCellFunction(TransmitterGenomeDescription()), - CellGenomeDescription().setCellFunction(ConstructorGenomeDescription().setGenome(GenomeDescriptionService::get().convertDescriptionToBytes(subgenome))), - }); - - DataDescription data; - data.addCells({ - CellDescription() - .setId(1) - .setPos({9.0f, 10.0f}) - .setMaxConnections(1) - .setExecutionOrderNumber(0) - .setEnergy(_parameters.cellNormalEnergy[0] * 2) - .setCellFunction(ConstructorDescription().setNumInheritedGenomeNodes(4).setGenome(GenomeDescriptionService::get().convertDescriptionToBytes(genome))), - CellDescription() - .setId(2) - .setPos({10.0f, 10.0f}) - .setMaxConnections(2), - CellDescription() - .setId(3) - .setPos({11.0f, 10.0f}) - .setMaxConnections(2) - .setExecutionOrderNumber(0) - .setCellFunction(ConstructorDescription().setGenome(GenomeDescriptionService::get().convertDescriptionToBytes(subgenome))), - CellDescription().setId(4).setPos({12.0f, 10.0f}).setMaxConnections(1).setExecutionOrderNumber(0), - }); - data.addConnection(1, 2); - data.addConnection(2, 3); - - _simulationFacade->setSimulationData(data); - _simulationFacade->calcTimesteps(7); - - auto actualData = _simulationFacade->getSimulationData(); - - auto origReplicator = getCell(data, 1); - auto actualReplicator = getCell(actualData, 1); - - auto origOtherCell = getCell(data, 2); - auto actualOtherCell = getCell(actualData, 2); - - auto origConstructor = getCell(data, 3); - auto actualConstructor = getCell(actualData, 3); - - EXPECT_TRUE(actualReplicator.energy < origReplicator.energy - NEAR_ZERO); - EXPECT_TRUE(approxCompare(actualOtherCell.energy, origOtherCell.energy)); - EXPECT_TRUE(actualConstructor.energy > origConstructor.energy + NEAR_ZERO); - - EXPECT_TRUE(approxCompare(getEnergy(data), getEnergy(actualData))); -}