File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
interpreter/src/test/java/com/iluwatar/interpreter Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2828import java .util .ArrayList ;
2929import java .util .List ;
3030import java .util .function .BiFunction ;
31+ import java .util .function .IntBinaryOperator ;
32+
3133import org .junit .Test ;
3234
3335/**
@@ -45,14 +47,14 @@ public abstract class ExpressionTest<E extends Expression> {
4547 * @param resultCalc The function used to calculate the expected result
4648 * @return A data set with test entries
4749 */
48- static List <Object []> prepareParameters (final BiFunction < Integer , Integer , Integer > resultCalc ) {
50+ static List <Object []> prepareParameters (final IntBinaryOperator resultCalc ) {
4951 final List <Object []> testData = new ArrayList <>();
5052 for (int i = -10 ; i < 10 ; i ++) {
5153 for (int j = -10 ; j < 10 ; j ++) {
5254 testData .add (new Object []{
5355 new NumberExpression (i ),
5456 new NumberExpression (j ),
55- resultCalc .apply (i , j )
57+ resultCalc .applyAsInt (i , j )
5658 });
5759 }
5860 }
You can’t perform that action at this time.
0 commit comments