aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend/tests
diff options
context:
space:
mode:
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