@@ -49,7 +49,7 @@ describe('Hash table', function () {
4949 expect ( hashTable . buckets [ 14 ] . data ) . toBe ( 'value' ) ;
5050 expect ( hashTable . buckets [ 14 ] . next . data ) . toBe ( 'anotherValue' ) ;
5151 } ) ;
52- it ( 'should put() multiple K:Vs with hash collisions in properly (2).' , function ( ) {
52+ it ( 'should put() multiple K(int) :Vs with hash collisions in properly (2).' , function ( ) {
5353 var hashTable = new Hashtable ( ) ;
5454 hashTable . put ( 10 , 'value' , 'someHash' ) ;
5555 hashTable . put ( 35 , 'anotherValue' , 'someHash' ) ;
@@ -58,46 +58,46 @@ describe('Hash table', function () {
5858 expect ( hashTable . buckets [ 14 ] . next . data ) . toBe ( 'anotherValue' ) ;
5959 expect ( hashTable . buckets [ 14 ] . next . next . data ) . toBe ( 'lastValue' ) ;
6060 } ) ;
61- it ( 'should get() a k:v from table properly.' , function ( ) {
61+ it ( 'should get() a K(int):V from table properly.' , function ( ) {
6262 var hashTable = new Hashtable ( ) ;
6363 hashTable . put ( 10 , 'value' ) ;
6464 expect ( hashTable . get ( 10 ) ) . toBe ( 'value' ) ;
6565 } ) ;
66- it ( 'should get() a k:v with collisions from table properly (1).' , function ( ) {
66+ it ( 'should get() a K(int):V with collisions from table properly (1).' , function ( ) {
6767 var hashTable = new Hashtable ( ) ;
6868 hashTable . put ( 10 , 'value' , 'someHash' ) ;
6969 hashTable . put ( 35 , 'anotherValue' , 'someHash' ) ;
7070 expect ( hashTable . get ( 35 , 'someHash' ) ) . toBe ( 'anotherValue' ) ;
7171 } ) ;
72- it ( 'should get() a k:v with collisions from table properly (2).' , function ( ) {
72+ it ( 'should get() a K(int):V with collisions from table properly (2).' , function ( ) {
7373 var hashTable = new Hashtable ( ) ;
7474 hashTable . put ( 10 , 'value' , 'someHash' ) ;
7575 hashTable . put ( 35 , 'anotherValue' , 'someHash' ) ;
7676 hashTable . put ( 77 , 'lastValue' , 'someHash' ) ;
7777 expect ( hashTable . get ( 77 , 'someHash' ) ) . toBe ( 'lastValue' ) ;
7878 } ) ;
79- it ( 'should get() a k:v with collisions from table properly (3).' , function ( ) {
79+ it ( 'should get() a K(int):V with collisions from table properly (3).' , function ( ) {
8080 var hashTable = new Hashtable ( ) ;
8181 hashTable . put ( 10 , 'value' , 'someHash' ) ;
8282 hashTable . put ( 35 , 'anotherValue' , 'someHash' ) ;
8383 hashTable . put ( 77 , 'lastValue' , 'someHash' ) ;
8484 expect ( hashTable . get ( 35 , 'someHash' ) ) . toBe ( 'anotherValue' ) ;
8585 } ) ;
86- it ( 'should get() a k:v with collisions from table properly (4).' , function ( ) {
86+ it ( 'should get() a K(int):V with collisions from table properly (4).' , function ( ) {
8787 var hashTable = new Hashtable ( ) ;
8888 hashTable . put ( 10 , 'value' , 'someHash' ) ;
8989 hashTable . put ( 35 , 'anotherValue' , 'someHash' ) ;
9090 hashTable . put ( 77 , 'lastValue' , 'someHash' ) ;
9191 expect ( hashTable . get ( 10 , 'someHash' ) ) . toBe ( 'value' ) ;
9292 } ) ;
93- it ( 'should remove() a k:v from table properly.' , function ( ) {
93+ it ( 'should remove() a K(int):V from table properly.' , function ( ) {
9494 // remove only node/link in bucket : (B)
9595 var hashTable = new Hashtable ( ) ;
9696 hashTable . put ( 10 , 'value' ) ;
9797 hashTable . remove ( 10 ) ;
9898 expect ( hashTable . get ( 10 ) ) . toBe ( undefined ) ;
9999 } ) ;
100- it ( 'should remove() a k:v with collisions from table properly (2).' , function ( ) {
100+ it ( 'should remove() a K(int):V with collisions from table properly (2).' , function ( ) {
101101 // remove start node/link in bucket : (B) - A
102102 var hashTable = new Hashtable ( ) ;
103103 hashTable . put ( 10 , 'value' , 'someHash' ) ;
@@ -106,7 +106,7 @@ describe('Hash table', function () {
106106 expect ( hashTable . get ( 35 , 'someHash' ) ) . toBe ( 'anotherValue' ) ;
107107 expect ( hashTable . get ( 10 , 'someHash' ) ) . toBe ( undefined ) ;
108108 } ) ;
109- it ( 'should remove() a k:v with collisions from table properly (3).' , function ( ) {
109+ it ( 'should remove() a K(int):V with collisions from table properly (3).' , function ( ) {
110110 // remove start node/link in bucket : (B) - A - C
111111 var hashTable = new Hashtable ( ) ;
112112 hashTable . put ( 10 , 'value' , 'someHash' ) ;
@@ -116,7 +116,7 @@ describe('Hash table', function () {
116116 expect ( hashTable . get ( 35 , 'someHash' ) ) . toBe ( 'anotherValue' ) ;
117117 expect ( hashTable . get ( 66 , 'someHash' ) ) . toBe ( 'lastValue' ) ;
118118 } ) ;
119- it ( 'should remove() a k:v with collisions from table properly (4).' , function ( ) {
119+ it ( 'should remove() a K(int):V with collisions from table properly (4).' , function ( ) {
120120 // remove middle node/link in bucket : A - (B) - C
121121 var hashTable = new Hashtable ( ) ;
122122 hashTable . put ( 10 , 'value' , 'someHash' ) ;
0 commit comments