From fa1b7d248108dea57bebc3646e4a36e5d9585ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 22 Jun 2010 07:08:20 +0000 Subject: [PATCH] more tests for Format.Filter.v1, all pass in FF3, IE7 and Chromium6, no functional change git-svn-id: http://svn.openlayers.org/trunk/openlayers@10421 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- tests/Format/Filter/v1.html | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/tests/Format/Filter/v1.html b/tests/Format/Filter/v1.html index a596521213..f2bdbb7286 100644 --- a/tests/Format/Filter/v1.html +++ b/tests/Format/Filter/v1.html @@ -5,9 +5,14 @@ function test_PropertyIsBetween(t) { - t.plan(3); + t.plan(6); - var test_xml = + var test_wml, parser, xml; + + parser = new OpenLayers.Format.Filter.v1(); + xml = new OpenLayers.Format.XML(); + + test_xml = '' + '' + 'number' + @@ -20,16 +25,30 @@ '' + ''; - var parser = new OpenLayers.Format.Filter.v1(); - var xml = new OpenLayers.Format.XML(); var filter = parser.read(xml.read(test_xml).documentElement); - t.eq(filter.type, OpenLayers.Filter.Comparison.BETWEEN, - "read correct type"); + "[0] read correct type"); t.eq(filter.lowerBoundary, 0, - "record correct lower boundary value"); + "[0] record correct lower boundary value"); t.eq(filter.upperBoundary, 100, - "record correct upper boundary value"); + "[0] record correct upper boundary value"); + + test_xml = + '' + + '' + + 'number' + + '0' + + '100' + + '' + + ''; + + var filter = parser.read(xml.read(test_xml).documentElement); + t.eq(filter.type, OpenLayers.Filter.Comparison.BETWEEN, + "[1] read correct type"); + t.eq(filter.lowerBoundary, 0, + "[1] record correct lower boundary value"); + t.eq(filter.upperBoundary, 100, + "[1] record correct upper boundary value"); }