mirror of
https://github.com/DanilaFe/abacus
synced 2025-01-09 15:54:13 -08:00
Bring tests up to date.
This commit is contained in:
parent
fbc12ec41c
commit
e3c37cf10a
@ -20,12 +20,12 @@ public class TokenizerTests {
|
|||||||
private static LexerTokenizer lexerTokenizer = new LexerTokenizer();
|
private static LexerTokenizer lexerTokenizer = new LexerTokenizer();
|
||||||
private static NumberFunction subtractFunction = new NumberFunction() {
|
private static NumberFunction subtractFunction = new NumberFunction() {
|
||||||
@Override
|
@Override
|
||||||
protected boolean matchesParams(NumberInterface[] params) {
|
public boolean matchesParams(NumberInterface[] params) {
|
||||||
return params.length == 2;
|
return params.length == 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected NumberInterface applyInternal(NumberInterface[] params) {
|
public NumberInterface applyInternal(NumberInterface[] params) {
|
||||||
return params[0].subtract(params[1]);
|
return params[0].subtract(params[1]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -36,12 +36,12 @@ public class TokenizerTests {
|
|||||||
0) {
|
0) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean matchesParams(NumberInterface[] params) {
|
public boolean matchesParams(NumberInterface[] params) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected NumberInterface applyInternal(NumberInterface[] params) {
|
public NumberInterface applyInternal(NumberInterface[] params) {
|
||||||
return subtractFunction.apply(params);
|
return subtractFunction.apply(params);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -49,12 +49,12 @@ public class TokenizerTests {
|
|||||||
0) {
|
0) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean matchesParams(NumberInterface[] params) {
|
public boolean matchesParams(NumberInterface[] params) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected NumberInterface applyInternal(NumberInterface[] params) {
|
public NumberInterface applyInternal(NumberInterface[] params) {
|
||||||
return subtractFunction.apply(params);
|
return subtractFunction.apply(params);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user