From d8ab8a2424a689cff4c787b0448c893facaadf6f Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Tue, 11 Feb 2014 08:14:09 +0000 Subject: Worked on more tests, finished restructuring resources --- src/jcgp/tests/ChromosomeTests.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/jcgp/tests') diff --git a/src/jcgp/tests/ChromosomeTests.java b/src/jcgp/tests/ChromosomeTests.java index 123cbd1..75e3596 100644 --- a/src/jcgp/tests/ChromosomeTests.java +++ b/src/jcgp/tests/ChromosomeTests.java @@ -22,10 +22,8 @@ import org.junit.Test; * Tests which cover the behaviour specified for a chromosome. * * - The chromosome should be able to return a specified node, input or output. - * - It should be able to return a MutableElement indexed by row and column, - * where column NodeCount returns outputs. - * - It should be able to return a Connection indexed by row and column, where - * column 0 returns inputs. + * - It should be able to return a random MutableElement. + * - It should be able to return a random Connection * - It should contain a freely modifiable fitness value. * - It should be a good citizen - fully initialised upon instantiation. * - It should feature a clone constructor, which creates a deep copy of a @@ -91,8 +89,8 @@ public class ChromosomeTests { && chromosome.getOutput(2).calculate() == 4 && chromosome.getOutput(0) instanceof Output; assertTrue("Incorrect output returned.", outputReturn); - // get a mutable element, that that it is a Mutable - boolean mutableReturn = chromosome.getMutable() instanceof Output; + // get a mutable element, check that it is a Mutable + boolean mutableReturn = chromosome.getRandomMutableElement() instanceof Output; // set a fitness value, check if returned value is the same chromosome.setFitness(10); -- cgit v1.2.3