Commit d3cf1ef9 authored by Mike Bostock's avatar Mike Bostock
Browse files

Merge pull request #1801 from jimkang/fix-quadtree-child-tests

Fix quadtree tests that check the children of a node
parents 8e1ec1e7 a2fae346
......@@ -29,10 +29,10 @@ suite.addBatch({
n = 0;
q.visit(function(node, x1, y1, x2, y2) {
assert.deepEqual(node.point, point);
assert.isUndefined(node[0]);
assert.isUndefined(node[1]);
assert.isUndefined(node[2]);
assert.isUndefined(node[3]);
assert.isUndefined(node.nodes[0]);
assert.isUndefined(node.nodes[1]);
assert.isUndefined(node.nodes[2]);
assert.isUndefined(node.nodes[3]);
assert.isTrue(node.leaf);
++n;
});
......@@ -46,10 +46,10 @@ suite.addBatch({
n = 0;
q.visit(function(node, x1, y1, x2, y2) {
assert.deepEqual(node.point, point);
assert.isUndefined(node[0]);
assert.isUndefined(node[1]);
assert.isUndefined(node[2]);
assert.isUndefined(node[3]);
assert.isUndefined(node.nodes[0]);
assert.isUndefined(node.nodes[1]);
assert.isUndefined(node.nodes[2]);
assert.isUndefined(node.nodes[3]);
assert.isTrue(node.leaf);
++n;
});
......@@ -60,10 +60,10 @@ suite.addBatch({
n = 0;
q.visit(function(node, x1, y1, x2, y2) {
assert.isNull(node.point);
assert.isUndefined(node[0]);
assert.isUndefined(node[1]);
assert.isUndefined(node[2]);
assert.isUndefined(node[3]);
assert.isUndefined(node.nodes[0]);
assert.isUndefined(node.nodes[1]);
assert.isUndefined(node.nodes[2]);
assert.isUndefined(node.nodes[3]);
assert.isTrue(node.leaf);
++n;
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment