Added support for PropertyIsNull filter.

Added a simple comparison and read/write for PropertyIsNull
encoded as XML including tests for each.
This commit is contained in:
Matt Walker
2012-10-12 22:40:56 +01:00
parent 0b3f582e10
commit d5013d6df5
4 changed files with 86 additions and 1 deletions
+28
View File
@@ -164,6 +164,34 @@
}),
context: {prop: "FOO"},
expect: false
}, {
filter: new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.IS_NULL,
property: "prop"
}),
context: {prop: null},
expect: true
}, {
filter: new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.IS_NULL,
property: "prop"
}),
context: {prop: undefined},
expect: true
}, {
filter: new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.IS_NULL,
property: "prop"
}),
context: {prop: "foo"},
expect: false
}, {
filter: new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.IS_NULL,
property: "prop"
}),
context: {prop: 0},
expect: false
}];
t.plan(cases.length);