From 73eb0d5745b68418f68f6ec12b1d6058b8e68074 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sat, 16 Aug 2008 10:52:01 +0000 Subject: [PATCH] use t.eq instead of t.ok when comparing values git-svn-id: http://svn.openlayers.org/trunk/openlayers@7771 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- tests/Renderer/Elements.html | 40 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/Renderer/Elements.html b/tests/Renderer/Elements.html index a94d4fcca9..8e66bb33b4 100644 --- a/tests/Renderer/Elements.html +++ b/tests/Renderer/Elements.html @@ -489,40 +489,40 @@ return result; } - t.ok(r.root.childNodes.length == 1, "root is correctly filled"); - t.ok(r.indexer.maxZIndex == 10, "indexer.maxZIndex is correctly filled"); - t.ok(r.indexer.order.length == 1, "indexer.order is correctly filled"); - t.ok(count(r.indexer.indices) == 1, "indexer.indices is correctly filled"); + t.eq(r.root.childNodes.length, 1, "root is correctly filled"); + t.eq(r.indexer.maxZIndex, 10, "indexer.maxZIndex is correctly filled"); + t.eq(r.indexer.order.length, 1, "indexer.order is correctly filled"); + t.eq(count(r.indexer.indices), 1, "indexer.indices is correctly filled"); r.eraseGeometry(geometry); - t.ok(r.root.childNodes.length == 0, "root is correctly cleared"); - t.ok(r.indexer.maxZIndex == 0, "indexer.maxZIndex is correctly reset"); - t.ok(r.indexer.order.length == 0, "indexer.order is correctly reset"); - t.ok(count(r.indexer.indices) == 0, "indexer.indices is correctly reset"); + t.eq(r.root.childNodes.length, 0, "root is correctly cleared"); + t.eq(r.indexer.maxZIndex, 0, "indexer.maxZIndex is correctly reset"); + t.eq(r.indexer.order.length, 0, "indexer.order is correctly reset"); + t.eq(count(r.indexer.indices), 0, "indexer.indices is correctly reset"); delete(style.graphicZIndex); r.drawGeometry(geometry, style, featureId); - t.ok(r.root.childNodes.length == 1, "root is correctly filled"); - t.ok(r.indexer.maxZIndex == 0, "indexer.maxZIndex is correctly filled"); - t.ok(r.indexer.order.length == 1, "indexer.order is correctly filled"); - t.ok(count(r.indexer.indices) == 1, "indexer.indices is correctly filled"); + t.eq(r.root.childNodes.length, 1, "root is correctly filled"); + t.eq(r.indexer.maxZIndex, 0, "indexer.maxZIndex is correctly filled"); + t.eq(r.indexer.order.length, 1, "indexer.order is correctly filled"); + t.eq(count(r.indexer.indices), 1, "indexer.indices is correctly filled"); r.clear(); - t.ok(r.root.childNodes.length == 0, "root is correctly cleared"); - t.ok(r.indexer.maxZIndex == 0, "indexer.maxZIndex is correctly reset"); - t.ok(r.indexer.order.length == 0, "indexer.order is correctly reset"); - t.ok(count(r.indexer.indices) == 0, "indexer.indices is correctly reset"); + t.eq(r.root.childNodes.length, 0, "root is correctly cleared"); + t.eq(r.indexer.maxZIndex, 0, "indexer.maxZIndex is correctly reset"); + t.eq(r.indexer.order.length, 0, "indexer.order is correctly reset"); + t.eq(count(r.indexer.indices), 0, "indexer.indices is correctly reset"); style.graphicZIndex = 12; r.drawGeometry(geometry, style, featureId); - t.ok(r.root.childNodes.length == 1, "root is correctly filled"); - t.ok(r.indexer.maxZIndex == 12, "indexer.maxZIndex is correctly filled"); - t.ok(r.indexer.order.length == 1, "indexer.order is correctly filled"); - t.ok(count(r.indexer.indices) == 1, "indexer.indices is correctly filled"); + t.eq(r.root.childNodes.length, 1, "root is correctly filled"); + t.eq(r.indexer.maxZIndex, 12, "indexer.maxZIndex is correctly filled"); + t.eq(r.indexer.order.length, 1, "indexer.order is correctly filled"); + t.eq(count(r.indexer.indices), 1, "indexer.indices is correctly filled"); tearDown(); }