annotate libtests/0001/prog1.c @ 489:4cb6c611f812 api-inversion

Begin removing uses of audiodb_query() audiodb_query() is actually an unsupportable interface. It requires access to the filesystem, does not (and cannot) actually support whole swathes of functionality, is only implementable using code that is no longer part of the core of audioDB (reporter.h), is in the way of fixing memory leaks in the SOAP server, and is horrible to use to boot. So, begin converting the libtests uses of audiodb_query() to audio_query_spec(). In the process, go through the test code and remove useless comments, pointless variables, and commented-out bits of shell scripts.
author mas01cr
date Sat, 10 Jan 2009 15:32:53 +0000
parents e072aa1611f5
children
rev   line source
mas01cr@487 1 #include "audioDB_API.h"
mas01cr@487 2 #include "test_utils_lib.h"
mas01ik@355 3
mas01cr@489 4 int main(int argc, char **argv) {
mas01cr@489 5 adb_t *adb;
mas01cr@489 6 struct stat st;
mas01ik@355 7
mas01cr@489 8 clean_remove_db(TESTDB);
mas01ik@355 9
mas01cr@489 10 adb = audiodb_open(TESTDB, O_RDWR);
mas01cr@489 11 if(adb)
mas01cr@489 12 return 1;
mas01ik@355 13
mas01cr@489 14 adb = audiodb_create(TESTDB, 0, 0, 0);
mas01cr@489 15 if (!adb)
mas01cr@489 16 return 1;
mas01ik@355 17
mas01cr@489 18 if(stat(TESTDB, &st))
mas01cr@489 19 return 1;
mas01ik@355 20
mas01cr@489 21 audiodb_close(adb);
mas01ik@355 22
mas01cr@489 23 adb = audiodb_create(TESTDB, 0, 0, 0);
mas01cr@489 24 if(adb)
mas01cr@489 25 return 1;
mas01ik@355 26
mas01cr@489 27 adb = audiodb_open(TESTDB, O_RDONLY);
mas01cr@489 28 if (!adb)
mas01cr@489 29 return 1;
mas01ik@355 30
mas01cr@489 31 audiodb_close(adb);
mas01ik@355 32
mas01cr@489 33 return 104;
mas01ik@355 34 }