From 91d3de4f18b12786ad546c6618cd348ed812e884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Ooms?= Date: Thu, 14 May 2020 19:22:23 +0200 Subject: [PATCH] :mag: test: Make tests pass. --- .../undirected/offline/algo/eulerian/dup.js | 12 +-- .../offline/algo/eulerian/eventour.js | 11 +-- .../offline/algo/eulerian/oddgraph.js | 5 +- .../offline/algo/eulerian/simplegraph.js | 11 ++- .../offline/algo/eulerian/wblossom_n3.js | 63 +++++++------- .../undirected/offline/algo/sp/dijkstra.js | 10 +-- test/src/undirected/offline/algo/sp/floyd.js | 13 +-- .../undirected/offline/algo/sp/sptreedfs.js | 11 +-- test/src/undirected/offline/algo/util/copy.js | 83 +++++++++---------- test/src/undirected/online/data/aeitr.js | 6 +- test/src/undirected/online/data/dense.js | 5 +- test/src/undirected/online/data/fuse.js | 3 +- test/src/undirected/online/data/gindex.js | 10 +-- test/src/undirected/online/data/sparse.js | 10 +-- 14 files changed, 129 insertions(+), 124 deletions(-) diff --git a/test/src/undirected/offline/algo/eulerian/dup.js b/test/src/undirected/offline/algo/eulerian/dup.js index a573e70..79999ca 100644 --- a/test/src/undirected/offline/algo/eulerian/dup.js +++ b/test/src/undirected/offline/algo/eulerian/dup.js @@ -1,10 +1,10 @@ import test from 'ava'; - +import * as gn from '../../../../../../src' ; var check = function(label, n, E, m){ - test('dup #' + label, function(assert){ + test('dup #' + label, t => { var DGraph = gn.dense_graph_t(); var SGraph = gn.sparse_graph_t(); @@ -54,9 +54,9 @@ var check = function(label, n, E, m){ i = m.length; while(i--){ - var u = m[i][0], w = m[i][1]; + const u = m[i][0], w = m[i][1]; while(u !== w){ - var t = s[u][w]; + const t = s[u][w]; ++count[0][u][t]; ++count[0][t][u]; u = t; @@ -70,7 +70,7 @@ var check = function(label, n, E, m){ }); t.deepEqual(count[1], count[0], 'check edge count'); - + }); @@ -130,4 +130,4 @@ var I = [ for(var i = 0; i < I.length; ++i){ check.apply(undefined, I[i]); -} \ No newline at end of file +} diff --git a/test/src/undirected/offline/algo/eulerian/eventour.js b/test/src/undirected/offline/algo/eulerian/eventour.js index c98147f..fe5bcd5 100644 --- a/test/src/undirected/offline/algo/eulerian/eventour.js +++ b/test/src/undirected/offline/algo/eulerian/eventour.js @@ -1,11 +1,12 @@ import test from 'ava'; +import * as gn from '../../../../../../src' ; var check = function(label, n, x, E, _E){ if (_E === undefined) _E = []; - test('eventour #' + label, function(assert){ + test('eventour #' + label, t => { var Graph = gn.sparse_graph_t(); @@ -52,7 +53,7 @@ var check = function(label, n, x, E, _E){ edges.forEach(function(e){ free.push(e.free); }); - + t.deepEqual(free, gn.sqmat(1, E.length, false), 'check free'); @@ -63,7 +64,7 @@ var check = function(label, n, x, E, _E){ } - + }); @@ -165,7 +166,7 @@ var I = [ ], [ - 'disconected 2 + 0-1 * 4 + 0-8 * 2', + 'disconnected 2 + 0-1 * 4 + 0-8 * 2', 11, 0, [ @@ -198,4 +199,4 @@ var I = [ for(var i = 0; i < I.length; ++i){ check.apply(undefined, I[i]); -} \ No newline at end of file +} diff --git a/test/src/undirected/offline/algo/eulerian/oddgraph.js b/test/src/undirected/offline/algo/eulerian/oddgraph.js index ea3977a..8e161ea 100644 --- a/test/src/undirected/offline/algo/eulerian/oddgraph.js +++ b/test/src/undirected/offline/algo/eulerian/oddgraph.js @@ -1,9 +1,10 @@ import test from 'ava'; +import * as gn from '../../../../../../src' ; var check = function(label, n, E){ - test('oddgraph #' + label, function(assert){ + test('oddgraph #' + label, t => { var Graph = gn.dense_graph_t(); @@ -112,4 +113,4 @@ var I = [ for(var i = 0; i < I.length; ++i){ check.apply(undefined, I[i]); -} \ No newline at end of file +} diff --git a/test/src/undirected/offline/algo/eulerian/simplegraph.js b/test/src/undirected/offline/algo/eulerian/simplegraph.js index aa2719a..ca19e39 100644 --- a/test/src/undirected/offline/algo/eulerian/simplegraph.js +++ b/test/src/undirected/offline/algo/eulerian/simplegraph.js @@ -1,8 +1,11 @@ import test from 'ava'; + +import * as gn from '../../../../../../src' ; + var check = function(name, order, E){ - test("simplegraph #" + name, function(assert){ + test("simplegraph #" + name, function(t){ var SGraph = gn.sparse_graph_t(); @@ -27,10 +30,10 @@ var check = function(name, order, E){ g.eadd(V[e[0]], V[e[1]], e[2]); } - + var d = gn.sqmat(2, order, Infinity); - + simplegraph(g, order, d, h); @@ -134,4 +137,4 @@ var I = [ for(var i = 0; i < I.length; ++i){ check.apply(undefined, I[i]); -} \ No newline at end of file +} diff --git a/test/src/undirected/offline/algo/eulerian/wblossom_n3.js b/test/src/undirected/offline/algo/eulerian/wblossom_n3.js index b674ab2..23e359f 100644 --- a/test/src/undirected/offline/algo/eulerian/wblossom_n3.js +++ b/test/src/undirected/offline/algo/eulerian/wblossom_n3.js @@ -1,119 +1,116 @@ -import test from 'ava'; +import test from 'ava' ; -var check = function(key, alg, callback){ - test(key, function(assert){ - callback(alg, assert); - }); -}; +import * as gn from '../../../../../../src' ; +function macro ( t , alg , callback ) { + callback(alg, t); +} -var tests = { +const tests = { - test10_empty : function(alg){ + test10_empty : (alg,t) => { // empty input graph t.deepEqual(alg([]), []); }, - test11_singleedge : function(alg){ + test11_singleedge : (alg,t) => { // single edge t.deepEqual(alg([ [0,1,1] ]), [1, 0]); }, - test12 : function(alg){ + test12 : (alg,t) => { t.deepEqual(alg([ [1,2,10], [2,3,11] ]), [ -1, -1, 3, 2 ]); }, - test13 : function(alg){ + test13 : (alg,t) => { t.deepEqual(alg([ [1,2,5], [2,3,11], [3,4,5] ]), [ -1, -1, 3, 2, -1 ]); }, - test14_maxcard : function(alg){ + test14_maxcard : (alg,t) => { // maximum cardinality t.deepEqual(alg([ [1,2,5], [2,3,11], [3,4,5] ], true), [ -1, 2, 1, 4, 3 ]); }, - test15_float : function(alg){ + test15_float : (alg,t) => { // floating point weigths t.deepEqual(alg([ [1,2,Math.PI], [2,3,Math.E], [1,3,3.0], [1,4,Math.sqrt(2.0)] ]), [ -1, 4, 3, 2, 1 ]); }, - test16_negative : function(alg){ + test16_negative : (alg,t) => { // negative weights t.deepEqual(alg([ [1,2,2], [1,3,-2], [2,3,1], [2,4,-1], [3,4,-6] ], false), [ -1, 2, 1, -1, -1 ]); t.deepEqual(alg([ [1,2,2], [1,3,-2], [2,3,1], [2,4,-1], [3,4,-6] ], true), [ -1, 3, 4, 1, 2 ]); }, - test20_sblossom : function(alg){ + test20_sblossom : (alg,t) => { // create S-blossom and use it for augmentation t.deepEqual(alg([ [1,2,8], [1,3,9], [2,3,10], [3,4,7] ]), [ -1, 2, 1, 4, 3 ]); t.deepEqual(alg([ [1,2,8], [1,3,9], [2,3,10], [3,4,7], [1,6,5], [4,5,6] ]), [ -1, 6, 3, 2, 5, 4, 1 ]); }, - test21_tblossom : function(alg){ + test21_tblossom : (alg,t) => { // create S-blossom, relabel as T-blossom, use for augmentation t.deepEqual(alg([ [1,2,9], [1,3,8], [2,3,10], [1,4,5], [4,5,4], [1,6,3] ]), [ -1, 6, 3, 2, 5, 4, 1 ]); t.deepEqual(alg([ [1,2,9], [1,3,8], [2,3,10], [1,4,5], [4,5,3], [1,6,4] ]), [ -1, 6, 3, 2, 5, 4, 1 ]); t.deepEqual(alg([ [1,2,9], [1,3,8], [2,3,10], [1,4,5], [4,5,3], [3,6,4] ]), [ -1, 2, 1, 6, 5, 4, 3 ]); }, - test22_s_nest : function(alg){ + test22_s_nest : (alg,t) => { // create nested S-blossom, use for augmentation t.deepEqual(alg([ [1,2,9], [1,3,9], [2,3,10], [2,4,8], [3,5,8], [4,5,10], [5,6,6] ]), [ -1, 3, 4, 1, 2, 6, 5 ]); }, - test23_s_relabel_nest : function(alg){ + test23_s_relabel_nest : (alg,t) => { // create S-blossom, relabel as S, include in nested S-blossom t.deepEqual(alg([ [1,2,10], [1,7,10], [2,3,12], [3,4,20], [3,5,20], [4,5,25], [5,6,10], [6,7,10], [7,8,8] ]), [ -1, 2, 1, 4, 3, 6, 5, 8, 7 ]); }, - test24_s_nest_expand : function(alg){ + test24_s_nest_expand : (alg,t) => { // create nested S-blossom, augment, expand recursively t.deepEqual(alg([ [1,2,8], [1,3,8], [2,3,10], [2,4,12], [3,5,12], [4,5,14], [4,6,12], [5,7,12], [6,7,14], [7,8,12] ]), [ -1, 2, 1, 5, 6, 3, 4, 8, 7 ]); }, - test25_s_t_expand : function(alg){ + test25_s_t_expand : (alg,t) => { // create S-blossom, relabel as T, expand t.deepEqual(alg([ [1,2,23], [1,5,22], [1,6,15], [2,3,25], [3,4,22], [4,5,25], [4,8,14], [5,7,13] ]), [ -1, 6, 3, 2, 8, 7, 1, 5, 4 ]); }, - test26_s_nest_t_expand : function(alg){ + test26_s_nest_t_expand : (alg,t) => { // create nested S-blossom, relabel as T, expand t.deepEqual(alg([ [1,2,19], [1,3,20], [1,8,8], [2,3,25], [2,4,18], [3,5,18], [4,5,13], [4,7,7], [5,6,7] ]), [ -1, 8, 3, 2, 7, 6, 5, 4, 1 ]); }, - test30_tnasty_expand : function(alg){ + test30_tnasty_expand : (alg,t) => { // create blossom, relabel as T in more than one way, expand, augment t.deepEqual(alg([ [1,2,45], [1,5,45], [2,3,50], [3,4,45], [4,5,50], [1,6,30], [3,9,35], [4,8,35], [5,7,26], [9,10,5] ]), [ -1, 6, 3, 2, 8, 7, 1, 5, 4, 10, 9 ]); }, - test31_tnasty2_expand : function(alg){ + test31_tnasty2_expand : (alg,t) => { // again but slightly different t.deepEqual(alg([ [1,2,45], [1,5,45], [2,3,50], [3,4,45], [4,5,50], [1,6,30], [3,9,35], [4,8,26], [5,7,40], [9,10,5] ]), [ -1, 6, 3, 2, 8, 7, 1, 5, 4, 10, 9 ]); }, - test32_t_expand_leastslack : function(alg){ + test32_t_expand_leastslack : (alg,t) => { // create blossom, relabel as T, expand such that a new least-slack S-to-free edge is produced, augment t.deepEqual(alg([ [1,2,45], [1,5,45], [2,3,50], [3,4,45], [4,5,50], [1,6,30], [3,9,35], [4,8,28], [5,7,26], [9,10,5] ]), [ -1, 6, 3, 2, 8, 7, 1, 5, 4, 10, 9 ]); }, - test33_nest_tnasty_expand : function(alg){ + test33_nest_tnasty_expand : (alg,t) => { // create nested blossom, relabel as T in more than one way, expand outer blossom such that inner blossom ends up on an augmenting path t.deepEqual(alg([ [1,2,45], [1,7,45], [2,3,50], [3,4,45], [4,5,95], [4,6,94], [5,6,94], [6,7,50], [1,8,30], [3,11,35], [5,9,36], [7,10,26], [11,12,5] ]), [ -1, 8, 3, 2, 6, 9, 4, 10, 1, 5, 7, 12, 11 ]); }, - test34_nest_relabel_expand : function(alg){ + test34_nest_relabel_expand : (alg,t) => { // create nested S-blossom, relabel as S, expand recursively t.deepEqual(alg([ [1,2,40], [1,3,40], [2,3,60], [2,4,55], [3,5,55], [4,5,50], [1,8,15], [5,7,30], [7,6,10], [8,10,10], [4,9,30] ]), [ -1, 2, 1, 5, 9, 3, 7, 6, 10, 4, 8 ]); } }; -var alg = [ - gn.wblossom_n3_t(true, true, true), +const alg = [ + gn.wblossom_n3_t(false, true, true), gn.wblossom_n3_t(false, false, false), gn.wblossom_n3_t() ]; - -for(var i = 0; i < alg.length; ++i){ - for(var key in tests) - check(key, alg[i], tests[key]); -} +for(let i = 0; i < alg.length; ++i) + for(const key in tests) + test(`${key} ${i}`, macro, alg[i], tests[key]); diff --git a/test/src/undirected/offline/algo/sp/dijkstra.js b/test/src/undirected/offline/algo/sp/dijkstra.js index d9aa4ab..bda29e7 100644 --- a/test/src/undirected/offline/algo/sp/dijkstra.js +++ b/test/src/undirected/offline/algo/sp/dijkstra.js @@ -1,19 +1,19 @@ import test from 'ava'; - -import binomialheap from "@aureooms/js-binomial-heap" ; +import { BinomialHeap , BinomialTreeWithParent } from "@aureooms/js-binomial-heap" ; import functools from "@aureooms/js-functools" ; +import * as gn from '../../../../../../src' ; + function one ( label, n, s, edges, prev, dist ) { test( "dijkstra #" + label, t => { - var Graph, PriorityQueue; var g, i, v, e, j, p, d, used, ref, left, predicate; - PriorityQueue = binomialheap.BinomialHeap( binomialheap.BinomialTreeWithParent ); + const PriorityQueue = BinomialHeap( BinomialTreeWithParent ); - Graph = gn.dense_graph_t(); + const Graph = gn.dense_graph_t(); g = new Graph(); i = n; diff --git a/test/src/undirected/offline/algo/sp/floyd.js b/test/src/undirected/offline/algo/sp/floyd.js index 67688fa..272f4bd 100644 --- a/test/src/undirected/offline/algo/sp/floyd.js +++ b/test/src/undirected/offline/algo/sp/floyd.js @@ -1,9 +1,10 @@ import test from 'ava'; - -import binomialheap from "@aureooms/js-binomial-heap" ; +import { BinomialHeap , BinomialTreeWithParent } from "@aureooms/js-binomial-heap" ; import functools from "@aureooms/js-functools" ; +import * as gn from '../../../../../../src' ; + function one ( label, n, edges ) { test( "floyd #" + label, t => { @@ -12,11 +13,11 @@ test( "floyd #" + label, t => { var d, g, i, v, e, j; - var Graph, PriorityQueue, amat, floyd; + var amat, floyd; - PriorityQueue = binomialheap.BinomialHeap( binomialheap.BinomialTreeWithParent ); + const PriorityQueue = BinomialHeap( BinomialTreeWithParent ); - Graph = gn.dense_graph_t(); + const Graph = gn.dense_graph_t(); amat = gn.amat_t(); @@ -60,7 +61,7 @@ test( "floyd #" + label, t => { dist[i][i] = Infinity; - g.eitr( [i], function ( _, _, w ) { + g.eitr( [i], function ( _1, _2, w ) { dist[i][i] = Math.min( dist[i][i], w * 2 ); }); diff --git a/test/src/undirected/offline/algo/sp/sptreedfs.js b/test/src/undirected/offline/algo/sp/sptreedfs.js index b744b86..1487eb4 100644 --- a/test/src/undirected/offline/algo/sp/sptreedfs.js +++ b/test/src/undirected/offline/algo/sp/sptreedfs.js @@ -1,9 +1,10 @@ import test from 'ava'; - -import binomialheap from "@aureooms/js-binomial-heap" ; +import { BinomialHeap , BinomialTreeWithParent } from "@aureooms/js-binomial-heap" ; import functools from "@aureooms/js-functools" ; +import * as gn from '../../../../../../src' ; + function one ( label, n, edges ) { test( "sptreedfs #" + label, t => { @@ -12,11 +13,11 @@ test( "sptreedfs #" + label, t => { var next, successors, d; - var Graph, PriorityQueue, amat, floyd, sptreedfs; + var amat, floyd, sptreedfs; - PriorityQueue = binomialheap.BinomialHeap( binomialheap.BinomialTreeWithParent ); + const PriorityQueue = BinomialHeap( BinomialTreeWithParent ); - Graph = gn.dense_graph_t(); + const Graph = gn.dense_graph_t(); amat = gn.amat_t(); diff --git a/test/src/undirected/offline/algo/util/copy.js b/test/src/undirected/offline/algo/util/copy.js index 2fdbcfc..9ca22f7 100644 --- a/test/src/undirected/offline/algo/util/copy.js +++ b/test/src/undirected/offline/algo/util/copy.js @@ -1,76 +1,75 @@ import test from 'ava'; -var check = function(label, n, edges){ +import * as gn from '../../../../../../src' ; -test( 'copy', t => { +function macro (t, label, n, edges){ - var DGraph = gn.dense_graph_t(); - var SGraph = gn.sparse_graph_t(); - var index = gn.index_t(); - var amat = gn.amat_t(); - var copy = gn.copy_t(); + var DGraph = gn.dense_graph_t(); + var SGraph = gn.sparse_graph_t(); + var index = gn.index_t(); + var amat = gn.amat_t(); + var copy = gn.copy_t(); - var G = new index(new SGraph()); - var H = new DGraph(); + var G = new index(new SGraph()); + var H = new DGraph(); - var i = n; + var i = n; - var v = new Array(i); + var v = new Array(i); - while(i--) v[n-i-1] = G.vadd(); + while(i--) v[n-i-1] = G.vadd(); - for(var j = 0; j < edges.length; ++j){ - var e = edges[j]; - G.eadd(v[e[0]], v[e[1]], e[2]); - } + for(var j = 0; j < edges.length; ++j){ + var e = edges[j]; + G.eadd(v[e[0]], v[e[1]], e[2]); + } - copy(G, H); + copy(G, H); - var dist_G = gn.sqmat(2, n); - var dist_H = gn.sqmat(2, n); + var dist_G = gn.sqmat(2, n); + var dist_H = gn.sqmat(2, n); - amat(G, n, dist_G); - amat(H, n, dist_H); + amat(G, n, dist_G); + amat(H, n, dist_H); - t.deepEqual(dist_G, dist_H, 'H === copy(G)'); + t.deepEqual(dist_G, dist_H, 'H === copy(G)'); - G = new DGraph(); - H = new index(new SGraph()); + G = new DGraph(); + H = new index(new SGraph()); - i = n; + i = n; - while(i--) v[n-i-1] = G.vadd(); + while(i--) v[n-i-1] = G.vadd(); - for(var j = 0; j < edges.length; ++j){ - var e = edges[j]; - G.eadd(v[e[0]], v[e[1]], e[2]); - } + for(var j = 0; j < edges.length; ++j){ + var e = edges[j]; + G.eadd(v[e[0]], v[e[1]], e[2]); + } - copy(G, H); + copy(G, H); - dist_G = gn.sqmat(2, n); - dist_H = gn.sqmat(2, n); + dist_G = gn.sqmat(2, n); + dist_H = gn.sqmat(2, n); - amat(G, n, dist_G); - amat(H, n, dist_H); + amat(G, n, dist_G); + amat(H, n, dist_H); - t.deepEqual(dist_G, dist_H, 'H === copy(G)'); + t.deepEqual(dist_G, dist_H, 'H === copy(G)'); +} - }); +macro.title = (_, label, n, edges) => `copy <${label}>` ; -}; - -var I = [ +const I = [ [ '1', 10, @@ -118,6 +117,4 @@ var I = [ ]; -for(var i = 0; i < I.length; ++i){ - check.apply(undefined, I[i]); -} \ No newline at end of file +for (const i of I) test(macro, ...i) ; diff --git a/test/src/undirected/online/data/aeitr.js b/test/src/undirected/online/data/aeitr.js index 0bb2f25..88cb199 100644 --- a/test/src/undirected/online/data/aeitr.js +++ b/test/src/undirected/online/data/aeitr.js @@ -1,8 +1,10 @@ import test from 'ava'; +import * as gn from '../../../../../src' ; + var check = function(label, n, edges){ -test( 'aeitr', t => { +test( `aeitr ${label}`, t => { var DGraph = gn.dense_graph_t(); var SGraph = gn.sparse_graph_t(); @@ -122,4 +124,4 @@ var I = [ for(var i = 0; i < I.length; ++i){ check.apply(undefined, I[i]); -} \ No newline at end of file +} diff --git a/test/src/undirected/online/data/dense.js b/test/src/undirected/online/data/dense.js index ff8744f..dd352d0 100644 --- a/test/src/undirected/online/data/dense.js +++ b/test/src/undirected/online/data/dense.js @@ -1,7 +1,8 @@ import test from 'ava'; +import * as gn from '../../../../../src' ; -test('dense', function(assert){ +test('dense', t => { var Graph = gn.dense_graph_t(); var g = new Graph(); @@ -104,4 +105,4 @@ test('dense', function(assert){ t.truthy(false, 'vitr never go here'); }); -}); \ No newline at end of file +}); diff --git a/test/src/undirected/online/data/fuse.js b/test/src/undirected/online/data/fuse.js index c296068..d589b53 100644 --- a/test/src/undirected/online/data/fuse.js +++ b/test/src/undirected/online/data/fuse.js @@ -1,5 +1,6 @@ import test from 'ava'; +import * as gn from '../../../../../src' ; test( 'fuse', t => { @@ -67,4 +68,4 @@ test( 'fuse', t => { -}); \ No newline at end of file +}); diff --git a/test/src/undirected/online/data/gindex.js b/test/src/undirected/online/data/gindex.js index 322e89b..20a8801 100644 --- a/test/src/undirected/online/data/gindex.js +++ b/test/src/undirected/online/data/gindex.js @@ -1,8 +1,8 @@ import test from 'ava'; +import * as gn from '../../../../../src' ; - -test('sparse index', function(assert){ +test('sparse index', t => { var Graph = gn.sparse_graph_t(); var index = gn.index_t(); @@ -57,7 +57,7 @@ test('sparse index', function(assert){ g.edel(e[4].splice(0, 1)[0]); - + for(var l = 0; l < r.length; ++l){ var m = r[l]; k = e[m].length; @@ -120,7 +120,7 @@ test('sparse index', function(assert){ -test('sparse index 0', function(assert){ +test('sparse index 0', t => { var Graph = gn.sparse_graph_t(); var index = gn.index_t(); @@ -175,7 +175,7 @@ test('sparse index 0', function(assert){ g.edel(e[4].splice(0, 1)[0]); - + for(var l = 0; l < r.length; ++l){ var m = r[l]; k = e[m].length; diff --git a/test/src/undirected/online/data/sparse.js b/test/src/undirected/online/data/sparse.js index 4a8b3bd..6aeee53 100644 --- a/test/src/undirected/online/data/sparse.js +++ b/test/src/undirected/online/data/sparse.js @@ -1,8 +1,8 @@ import test from 'ava'; +import * as gn from '../../../../../src' ; - -test('sparse', function(assert){ +test('sparse', t => { var Graph = gn.sparse_graph_t(); var g = new Graph(); @@ -55,7 +55,7 @@ test('sparse', function(assert){ g.edel(e[4].splice(0, 1)[0]); - + for(var l = 0; l < r.length; ++l){ var m = r[l]; k = e[m].length; @@ -117,7 +117,7 @@ test('sparse', function(assert){ -test('sparse 2', function(assert){ +test('sparse 2', t => { var Graph = gn.sparse_graph_t(); var g = new Graph(); @@ -170,7 +170,7 @@ test('sparse 2', function(assert){ g.edel(e[4].splice(0, 1)[0]); - + for(var l = 0; l < r.length; ++l){ var m = r[l]; k = e[m].length;