Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit62700e1

Browse files
committed
Testing insert properly.
1 parentb201487 commit62700e1

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
varcount=10000;
109109
for(vari=0;i<count;++i){
110-
sTree.push(i);
110+
sTree.insert(0,i);
111111
}
112112
for(vari=0;i<count;++i){
113113
varnode=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)

[8]ページ先頭

©2009-2025 Movatter.jp