diff options
Diffstat (limited to 'src/jcgp/backend/tests')
-rw-r--r-- | src/jcgp/backend/tests/ChromosomeTests.java | 6 | ||||
-rw-r--r-- | src/jcgp/backend/tests/OutputTests.java | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/jcgp/backend/tests/ChromosomeTests.java b/src/jcgp/backend/tests/ChromosomeTests.java index b5c1da7..7cbf2e2 100644 --- a/src/jcgp/backend/tests/ChromosomeTests.java +++ b/src/jcgp/backend/tests/ChromosomeTests.java @@ -136,7 +136,7 @@ public class ChromosomeTests { } // mutate an output in clone, check that the same node in chromosome produces a different output - clone.getOutput(1).setConnection(resources.getRandomInt(resources.arity()), clone.getInput(2)); + clone.getOutput(1).setSource(clone.getInput(2)); assertTrue("Mutation affected nodes in both chromosomes.", clone.getOutput(1).calculate() != chromosome.getOutput(1).calculate()); @@ -332,8 +332,8 @@ public class ChromosomeTests { c.getNode(1, 1).initialise(resources.getFunction(0), c.getNode(0, 0), c.getInput(1)); c.getNode(1, 2).initialise(resources.getFunction(0), c.getNode(1, 1), c.getInput(2)); - c.getOutput(0).setConnection(0, c.getNode(0, 0)); - c.getOutput(1).setConnection(0, c.getNode(1, 2)); + c.getOutput(0).setSource(c.getNode(0, 0)); + c.getOutput(1).setSource(c.getNode(1, 2)); return c; } diff --git a/src/jcgp/backend/tests/OutputTests.java b/src/jcgp/backend/tests/OutputTests.java index 8cc10a8..c5aa6b4 100644 --- a/src/jcgp/backend/tests/OutputTests.java +++ b/src/jcgp/backend/tests/OutputTests.java @@ -47,7 +47,7 @@ public class OutputTests { @Test public void evaluationsTest() { // set source connection, check that the appropriate value is returned - output.setConnection(0, new Connection() { + output.setSource(new Connection() { @Override public Object getValue() { @@ -70,7 +70,7 @@ public class OutputTests { return 0; } }; - output.setConnection(0, newConn); + output.setSource(newConn); assertTrue("Incorrect connection returned.", output.getSource() == newConn); } |