Fix unit test for priority heap
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 3s
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 3s
This commit is contained in:
parent
9e95c5e292
commit
467c09a0e4
1 changed files with 2 additions and 2 deletions
|
@ -224,7 +224,7 @@ int main(void) {
|
||||||
for (unsigned int idx = max - 1; idx-- > 0;) {
|
for (unsigned int idx = max - 1; idx-- > 0;) {
|
||||||
unsigned int other_idx = simple_archiver_algo_lcg_defaults(idx) %
|
unsigned int other_idx = simple_archiver_algo_lcg_defaults(idx) %
|
||||||
(unsigned long long)(idx + 1);
|
(unsigned long long)(idx + 1);
|
||||||
if (idx != other_idx) {
|
if (max - 1 != other_idx) {
|
||||||
unsigned int temp = array[max - 1];
|
unsigned int temp = array[max - 1];
|
||||||
array[max - 1] = array[other_idx];
|
array[max - 1] = array[other_idx];
|
||||||
array[other_idx] = temp;
|
array[other_idx] = temp;
|
||||||
|
@ -292,7 +292,7 @@ int main(void) {
|
||||||
for (unsigned int idx = max - 1; idx-- > 0;) {
|
for (unsigned int idx = max - 1; idx-- > 0;) {
|
||||||
unsigned int other_idx = simple_archiver_algo_lcg_defaults(idx) %
|
unsigned int other_idx = simple_archiver_algo_lcg_defaults(idx) %
|
||||||
(unsigned long long)(idx + 1);
|
(unsigned long long)(idx + 1);
|
||||||
if (idx != other_idx) {
|
if (max - 1 != other_idx) {
|
||||||
unsigned int temp = array[max - 1];
|
unsigned int temp = array[max - 1];
|
||||||
array[max - 1] = array[other_idx];
|
array[max - 1] = array[other_idx];
|
||||||
array[other_idx] = temp;
|
array[other_idx] = temp;
|
||||||
|
|
Loading…
Reference in a new issue