Skip to content

Commit 62700e1

Browse files
committed
Testing insert properly.
1 parent b201487 commit 62700e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/data-structures/size-balanced-tree.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ describe('SBTree', function () {
107107
expect(sTree._root).toBe(Nil);
108108
var count = 10000;
109109
for (var i = 0; i < count; ++i) {
110-
sTree.push(i);
110+
sTree.insert(0, i);
111111
}
112112
for (var i = 0; i < count; ++i) {
113113
var node = sTree.remove(count - i - 1); // Always remove the last element;
114-
expect(node.value).toBe(count - i - 1);
114+
expect(node.value).toBe(i);
115115
expect(sTree.size).toBe(count - i - 1);
116116
}
117117
checkNil();

0 commit comments

Comments
 (0)