diff options
Diffstat (limited to 'src/jcgp/tests')
-rw-r--r-- | src/jcgp/tests/ChromosomeTests.java | 10 |
1 files changed, 4 insertions, 6 deletions
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); |