aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/tests
diff options
context:
space:
mode:
authorEduardo Pedroni <ep625@york.ac.uk>2014-02-11 08:14:09 +0000
committerEduardo Pedroni <ep625@york.ac.uk>2014-02-11 08:14:09 +0000
commitd8ab8a2424a689cff4c787b0448c893facaadf6f (patch)
treed6a459a8f4808b3042acdf33f108f485ce4ddf7c /src/jcgp/tests
parent6e7747e5b85f4ca93683ed5166f6e480cc58e6fa (diff)
Worked on more tests, finished restructuring resources
Diffstat (limited to 'src/jcgp/tests')
-rw-r--r--src/jcgp/tests/ChromosomeTests.java10
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);