fix: self-test example not working

This commit is contained in:
David Leal 2023-04-26 19:08:19 -06:00 committed by GitHub
parent 4ca4333efe
commit c0c27153cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,8 +81,9 @@ assert(backtracking::subset_sum::number_of_subsets(0, array1) ==
3. Small C++ program that showcases and explains the use of tests. 3. Small C++ program that showcases and explains the use of tests.
```cpp ```cpp
#include <vector> /// for std::vector #include <iostream> /// for IO operations
#include <cassert> /// for assert #include <vector> /// for std::vector
#include <cassert> /// for assert
/** /**
* @brief Verifies if the given array * @brief Verifies if the given array
@ -100,7 +101,7 @@ bool is_number_on_array(const std::vector<T> &arr, const int &number) {
return true; return true;
} }
else { else {
return false; // Number not in the current index, keep searching.
} }
} }