Mercurial > hg > audiodb
comparison libtests/0037/prog1.c @ 487:e072aa1611f5 api-inversion
Begin cleaning up libtests
* Delete unused functions from test_utils_lib.h.
* #include needed system header files there rather than at the head of
each of the individual C files.
* Make libtests.mk be responsible for finding audioDB_API.h and
test_utils_lib.h
* Simplify the implementation of clean_remove_db().
author | mas01cr |
---|---|
date | Sat, 10 Jan 2009 15:32:42 +0000 |
parents | c26c5b7ef0d2 |
children | 4cb6c611f812 |
comparison
equal
deleted
inserted
replaced
473:b2fd8113d8bc | 487:e072aa1611f5 |
---|---|
1 #include <stdio.h> | 1 #include "audioDB_API.h" |
2 #include <stdlib.h> | 2 #include "test_utils_lib.h" |
3 #include <string.h> | |
4 #include <sysexits.h> | |
5 #include <fcntl.h> | |
6 #include <dirent.h> | |
7 #include <unistd.h> | |
8 #include <sys/stat.h> | |
9 /* | |
10 * * #define NDEBUG | |
11 * * */ | |
12 #include <assert.h> | |
13 | |
14 #include "../../audioDB_API.h" | |
15 #include "../test_utils_lib.h" | |
16 | 3 |
17 int result_position(adb_query_results_t *r, const char *key, float dist, uint32_t qpos, uint32_t ipos) { | 4 int result_position(adb_query_results_t *r, const char *key, float dist, uint32_t qpos, uint32_t ipos) { |
18 for(uint32_t k = 0; k < r->nresults; k++) { | 5 for(uint32_t k = 0; k < r->nresults; k++) { |
19 adb_result_t result = r->results[k]; | 6 adb_result_t result = r->results[k]; |
20 if((dist == result.dist) && (qpos == result.qpos) && | 7 if((dist == result.dist) && (qpos == result.qpos) && |