Getters for math expression properties
This commit is contained in:
@@ -510,6 +510,28 @@ describe('ol.expression.Math', function() {
|
||||
});
|
||||
});
|
||||
|
||||
var op = ol.expression.MathOp.MOD;
|
||||
var left = new ol.expression.Identifier('foo');
|
||||
var right = new ol.expression.Literal(20);
|
||||
var expr = new ol.expression.Math(op, left, right);
|
||||
|
||||
describe('#getOperator()', function() {
|
||||
it('gets the operator', function() {
|
||||
expect(expr.getOperator()).to.be(op);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getLeft()', function() {
|
||||
it('gets the left expression', function() {
|
||||
expect(expr.getLeft()).to.be(left);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getRight()', function() {
|
||||
it('gets the right expression', function() {
|
||||
expect(expr.getRight()).to.be(right);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user