Proper specs

This commit is contained in:
Tim Schaub
2013-06-10 01:46:18 -06:00
parent 0abcbb9854
commit 20b66fc447

View File

@@ -4,9 +4,11 @@ goog.provide('ol.test.expression.Expression');
describe('ol.expression.BooleanLiteral', function() {
describe('constructor', function() {
var expr = new ol.expression.BooleanLiteral(true);
expect(expr).to.be.a(ol.expression.Expression);
expect(expr).to.be.a(ol.expression.BooleanLiteral);
it('creates a new expression', function() {
var expr = new ol.expression.BooleanLiteral(true);
expect(expr).to.be.a(ol.expression.Expression);
expect(expr).to.be.a(ol.expression.BooleanLiteral);
});
});
});
@@ -15,9 +17,11 @@ describe('ol.expression.BooleanLiteral', function() {
describe('ol.expression.Identifier', function() {
describe('constructor', function() {
var expr = new ol.expression.Identifier('foo');
expect(expr).to.be.a(ol.expression.Expression);
expect(expr).to.be.a(ol.expression.Identifier);
it('creates a new expression', function() {
var expr = new ol.expression.Identifier('foo');
expect(expr).to.be.a(ol.expression.Expression);
expect(expr).to.be.a(ol.expression.Identifier);
});
});
});
@@ -25,10 +29,12 @@ describe('ol.expression.Identifier', function() {
describe('ol.expression.Not', function() {
describe('constructor', function() {
var expr = new ol.expression.Not(
new ol.expression.BooleanLiteral(true));
expect(expr).to.be.a(ol.expression.Expression);
expect(expr).to.be.a(ol.expression.Not);
it('creates a new expression', function() {
var expr = new ol.expression.Not(
new ol.expression.BooleanLiteral(true));
expect(expr).to.be.a(ol.expression.Expression);
expect(expr).to.be.a(ol.expression.Not);
});
});
});
@@ -36,9 +42,11 @@ describe('ol.expression.Not', function() {
describe('ol.expression.NullLiteral', function() {
describe('constructor', function() {
var expr = new ol.expression.NullLiteral();
expect(expr).to.be.a(ol.expression.Expression);
expect(expr).to.be.a(ol.expression.NullLiteral);
it('creates a new expression', function() {
var expr = new ol.expression.NullLiteral();
expect(expr).to.be.a(ol.expression.Expression);
expect(expr).to.be.a(ol.expression.NullLiteral);
});
});
});
@@ -46,9 +54,11 @@ describe('ol.expression.NullLiteral', function() {
describe('ol.expression.NumericLiteral', function() {
describe('constructor', function() {
var expr = new ol.expression.NumericLiteral(42);
expect(expr).to.be.a(ol.expression.Expression);
expect(expr).to.be.a(ol.expression.NumericLiteral);
it('creates a new expression', function() {
var expr = new ol.expression.NumericLiteral(42);
expect(expr).to.be.a(ol.expression.Expression);
expect(expr).to.be.a(ol.expression.NumericLiteral);
});
});
});
@@ -56,9 +66,11 @@ describe('ol.expression.NumericLiteral', function() {
describe('ol.expression.StringLiteral', function() {
describe('constructor', function() {
var expr = new ol.expression.StringLiteral('bar');
expect(expr).to.be.a(ol.expression.Expression);
expect(expr).to.be.a(ol.expression.StringLiteral);
it('creates a new expression', function() {
var expr = new ol.expression.StringLiteral('bar');
expect(expr).to.be.a(ol.expression.Expression);
expect(expr).to.be.a(ol.expression.StringLiteral);
});
});
});