Skip to content

Commit e1f082d

Browse files
committed
fix: automated tests
1 parent d5c4470 commit e1f082d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/algorithms/controllers/HashingSearch.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ export default {
150150
},
151151
[i]
152152
);
153+
found = true; // Set testing variable
153154
}
154155

155156
// Chunker for not found
@@ -158,10 +159,10 @@ export default {
158159
IBookmarks.NotFound,
159160
(vis, idx) => {
160161
vis.array.fill(INDEX, idx, undefined, undefined, Colors.Collision); // Fill last slot with red
161-
found = false; // Set testing variable
162162
},
163163
[i]
164164
);
165+
found = false; // Set testing variable
165166
}
166167
return found; // Return found or not for testing
167168
}
@@ -188,6 +189,7 @@ export default {
188189
},
189190
[i]
190191
);
192+
found = true; // Set testing variable
191193
}
192194
if (table[i] === TARGET) {
193195
chunker.add(
@@ -197,6 +199,7 @@ export default {
197199
},
198200
[i]
199201
);
202+
found = true; // Set testing variable
200203
}
201204
}
202205
}
@@ -211,6 +214,7 @@ export default {
211214
},
212215
[i]
213216
);
217+
found = false; // Set testing variable
214218
}
215219
return found; // Return found or not for testing
216220
}

0 commit comments

Comments
 (0)