rsys

Basic data structures and low-level features
git clone git://git.meso-star.fr/rsys.git
Log | Files | Refs | README | LICENSE

commit 8d8421b7e5e5d15f840f02f05ea70f779935653e
parent 6bf6ec08e1e2a8f52bf62478c1af49401f259ae4
Author: vaplv <vaplv@free.fr>
Date:   Wed, 22 Nov 2017 08:59:58 +0100

Add a test to the search_lower_bound algorithm

Diffstat:
Msrc/test_algorithm.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/test_algorithm.c b/src/test_algorithm.c @@ -76,6 +76,9 @@ main(int argc, char** argv) d = 20.0, pd = search_lower_bound(&d, array_dbl, ndbls, sizeof(double), cmp_dbl); CHECK(pd, NULL); + i = -1, pi = search_lower_bound(&i, array_int, 1, sizeof(int), cmp_int); + CHECK(*pi, 0); + return 0; }