Mercurial > hg > audiodb
comparison libtests/0026/prog1.c @ 492:f6b126b018d8 api-inversion
Yet more audiodb_query() deletions.
Also delete the libtests/notes file, with its misleading and wrong
questions, to avoid further confusion.
author | mas01cr |
---|---|
date | Sat, 10 Jan 2009 15:33:07 +0000 |
parents | e072aa1611f5 |
children | 9d8aee621afb |
comparison
equal
deleted
inserted
replaced
491:29d28cfe0222 | 492:f6b126b018d8 |
---|---|
1 #include "audioDB_API.h" | 1 #include "audioDB_API.h" |
2 #include "test_utils_lib.h" | 2 #include "test_utils_lib.h" |
3 | 3 |
4 int main(int argc, char **argv) { | |
5 adb_t *adb; | |
6 | |
7 clean_remove_db(TESTDB); | |
8 if(!(adb = audiodb_create(TESTDB, 0, 0, 0))) | |
9 return 1; | |
4 | 10 |
5 int main(int argc, char **argv){ | 11 if(audiodb_power(adb)) |
12 return 1; | |
13 if(audiodb_power(adb)) | |
14 return 1; | |
6 | 15 |
7 int returnval=0; | 16 return 104; |
8 adb_ptr mydbp={0}; | |
9 // int ivals[10]; | |
10 // double dvals[10]; | |
11 // adbinsert myinsert={0}; | |
12 // unsigned int myerr=0; | |
13 char * databasename="testdb"; | |
14 // adbquery myadbquery={0}; | |
15 // adbqueryresult myadbqueryresult={0}; | |
16 // adbquery myadbquery2={0}; | |
17 // adbqueryresult myadbqueryresult2={0}; | |
18 int myerror=0; | |
19 | |
20 | |
21 /* remove old directory */ | |
22 //if [ -f testdb ]; then rm -f testdb; fi | |
23 clean_remove_db(databasename); | |
24 | |
25 /* create new db */ | |
26 //${AUDIODB} -N -d testdb | |
27 mydbp=audiodb_create(databasename,0,0,0); | |
28 | |
29 /* power flag on */ | |
30 //${AUDIODB} -P -d testdb | |
31 //${AUDIODB} -d testdb -P | |
32 myerror=audiodb_power(mydbp); | |
33 if (myerror){ | |
34 returnval=-1; | |
35 } | |
36 | |
37 //# should fail (no db given) | |
38 //expect_clean_error_exit ${AUDIODB} -P | |
39 /* not relevent, API wouldn't compile */ | |
40 | |
41 return(returnval); | |
42 } | 17 } |
43 |