aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend/tests
diff options
context:
space:
mode:
authorEduardo Pedroni <ep625@york.ac.uk>2014-05-01 13:05:27 +0100
committerEduardo Pedroni <ep625@york.ac.uk>2014-05-01 13:05:27 +0100
commit36f4393bcc9e55afa2334baa33e603ce839741a1 (patch)
treed9a1d55d0d3553193a3fc11a92f11515762d202f /src/jcgp/backend/tests
parent4c8de2402f2878cde7587c7f3bbf4ffaea86efd4 (diff)
Did more commenting, implemented reflection and statistics
Diffstat (limited to 'src/jcgp/backend/tests')
-rw-r--r--src/jcgp/backend/tests/TestFunctionSet.java13
1 files changed, 6 insertions, 7 deletions
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