Adding unit tests for rule based styling

This commit is contained in:
ahocevar
2013-03-03 15:25:20 +01:00
parent 63c048edb2
commit 5535a26d4a
6 changed files with 227 additions and 0 deletions

View File

@@ -1,5 +1,30 @@
goog.provide('ol.test.style.Line');
describe('ol.style.LineLiteral', function() {
describe('#equals()', function() {
it('identifies equal literals', function() {
var literal = new ol.style.LineLiteral({
strokeWidth: 3,
strokeStyle: '#BADA55'
});
var equalLiteral = new ol.style.LineLiteral({
strokeStyle: '#BADA55',
strokeWidth: 3
});
var differentLiteral = new ol.style.LineLiteral({
strokeStyle: '#013',
strokeWidth: 3
});
expect(literal.equals(equalLiteral)).toBe(true);
expect(literal.equals(differentLiteral)).toBe(false);
});
});
});
describe('ol.style.Line', function() {
describe('constructor', function() {