From 36f4393bcc9e55afa2334baa33e603ce839741a1 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Thu, 1 May 2014 13:05:27 +0100 Subject: Did more commenting, implemented reflection and statistics --- src/jcgp/backend/tests/TestFunctionSet.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/jcgp/backend/tests') diff --git a/src/jcgp/backend/tests/TestFunctionSet.java b/src/jcgp/backend/tests/TestFunctionSet.java index 1910d2a..11d9434 100644 --- a/src/jcgp/backend/tests/TestFunctionSet.java +++ b/src/jcgp/backend/tests/TestFunctionSet.java @@ -7,10 +7,10 @@ public class TestFunctionSet extends FunctionSet { public TestFunctionSet() { - functionList = new Function[] { + registerFunctions( new Function() { @Override - public Object run(Object... args) { + public Integer run(Object... args) { return (Integer) args[0] + (Integer) args[1]; } @Override @@ -20,7 +20,7 @@ public class TestFunctionSet extends FunctionSet { }, new Function() { @Override - public Object run(Object... args) { + public Integer run(Object... args) { return (Integer) args[0] - (Integer) args[1]; } @Override @@ -30,7 +30,7 @@ public class TestFunctionSet extends FunctionSet { }, new Function() { @Override - public Object run(Object... args) { + public Integer run(Object... args) { return (Integer) args[0] * (Integer) args[1]; } @Override @@ -40,7 +40,7 @@ public class TestFunctionSet extends FunctionSet { }, new Function() { @Override - public Object run(Object... args) { + public Integer run(Object... args) { return (Integer) args[0] / (Integer) args[1]; } @Override @@ -48,7 +48,6 @@ public class TestFunctionSet extends FunctionSet { return 2; } } - }; - enableAll(); + ); } } \ No newline at end of file -- cgit v1.2.3