MCPcopy Create free account
hub / github.com/chrxh/alien / TEST_F

Function TEST_F

source/EngineTests/MutationTests.cpp:653–672  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

651};
652
653TEST_F(MutationTests, propertiesMutation)
654{
655 auto genome = createGenomeWithMultipleCellsWithDifferentFunctions();
656 int byteIndex = 0;
657
658 auto data = DataDescription().addCells(
659 {CellDescription().setId(1).setCellFunction(ConstructorDescription().setGenome(genome).setGenomeCurrentNodeIndex(byteIndex)).setExecutionOrderNumber(0)});
660
661 _simulationFacade->setSimulationData(data);
662 for (int i = 0; i < 10000; ++i) {
663 _simulationFacade->testOnly_mutate(1, MutationType::Properties);
664 }
665
666 auto actualData = _simulationFacade->getSimulationData();
667 auto actualCellById = getCellById(actualData);
668
669 auto actualConstructor = std::get<ConstructorDescription>(*actualCellById.at(1).cellFunction);
670 EXPECT_TRUE(comparePropertiesMutation(genome, actualConstructor.genome));
671 EXPECT_EQ(byteIndex, actualConstructor.genomeCurrentNodeIndex);
672}
673
674TEST_F(MutationTests, neuronDataMutation)
675{

Callers

nothing calls this directly

Calls 15

GenomeDescriptionClass · 0.85
setGenomeMethod · 0.80
sizeMethod · 0.80
DataDescriptionClass · 0.50
CellDescriptionClass · 0.50
setSimulationDataMethod · 0.45

Tested by

no test coverage detected