test fixed

This commit is contained in:
Rendo 2026-03-30 22:55:20 +05:00
commit a355cd4d55

View file

@ -10,7 +10,7 @@ fn test_allelic_crossingover() {
let mut peashooter = peashooter_template();
let mut sunflower = sunflower_template();
GenomeModificator::with_seed(&mut peashooter, &mut sunflower,3996684975687038250u64).allelic_crossingover(None);
assert!(peashooter == PlantGenome::from_edges(vec![
assert!(peashooter.to_string() == PlantGenome::from_edges(vec![
Gene::new("Sunflower","root", GeneType::Dummy),
Gene::new("Peashooter","stem", GeneType::fill_all()),
Gene::new("Peashooter","head",GeneType::random_distribution()),
@ -21,8 +21,8 @@ fn test_allelic_crossingover() {
(1,2),
(2,3),
(2,4)
]).unwrap());
assert!(sunflower == PlantGenome::from_edges(vec![
]).unwrap().to_string());
assert!(sunflower.to_string() == PlantGenome::from_edges(vec![
Gene::new("Peashooter","root", GeneType::pure_producer(|_|{Flow::empty()})),
Gene::new("Sunflower","stem", GeneType::Dummy),
Gene::new("Sunflower","head", GeneType::modifier(|_|{None})),
@ -31,5 +31,5 @@ fn test_allelic_crossingover() {
(0,1),
(1,2),
(2,3),
]).unwrap());
]).unwrap().to_string());
}