Mercurial > hg > audiodb
annotate tests/0021/run-test.sh @ 381:9742ea0ac33d
API const correctness.
The char *path arguments to audiodb_open() and audiodb_create() should
be const; make it so.
Also arrange for the datasize, ntracks and datadim arguments to
audiodb_create() to be unsigned to match the fields in the internal
audioDB class. Technically this is an ABI change, but since nothing is
calling this function with anything other than zero arguments yet
(correct me if I'm wrong) no-one should notice. (If you notice, shout)
author | mas01cr |
---|---|
date | Fri, 21 Nov 2008 14:32:27 +0000 |
parents | fe4dc39b2dd7 |
children |
rev | line source |
---|---|
mas01cr@252 | 1 #! /bin/bash |
mas01cr@109 | 2 |
mas01cr@109 | 3 . ../test-utils.sh |
mas01cr@109 | 4 |
mas01cr@109 | 5 if [ -f testdb ]; then rm -f testdb; fi |
mas01cr@109 | 6 |
mas01cr@109 | 7 ${AUDIODB} -d testdb -N |
mas01cr@109 | 8 |
mas01cr@109 | 9 intstring 2 > testfeature |
mas01cr@109 | 10 floatstring 0 0.5 >> testfeature |
mas01cr@109 | 11 floatstring 0.5 0 >> testfeature |
mas01cr@109 | 12 |
mas01cr@109 | 13 ${AUDIODB} -d testdb -I -f testfeature |
mas01cr@109 | 14 |
mas01cr@109 | 15 # sequence queries require L2NORM |
mas01cr@109 | 16 ${AUDIODB} -d testdb -L |
mas01cr@109 | 17 |
mas01cr@109 | 18 start_server ${AUDIODB} 10021 |
mas01cr@109 | 19 |
mas01cr@109 | 20 echo "query point (0.0,0.5)" |
mas01cr@109 | 21 intstring 2 > testquery |
mas01cr@109 | 22 floatstring 0 0.5 >> testquery |
mas01cr@109 | 23 |
mas01cr@109 | 24 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery > testoutput |
mas01cr@109 | 25 echo testfeature 1 0 0 > test-expected-output |
mas01cr@109 | 26 cmp testoutput test-expected-output |
mas01cr@109 | 27 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery -n 1 > testoutput |
mas01cr@109 | 28 echo testfeature 0 0 0 > test-expected-output |
mas01cr@109 | 29 cmp testoutput test-expected-output |
mas01cr@109 | 30 |
mas01cr@109 | 31 check_server $! |
mas01cr@109 | 32 |
mas01cr@109 | 33 echo "query point (0.5,0.0)" |
mas01cr@109 | 34 intstring 2 > testquery |
mas01cr@109 | 35 floatstring 0.5 0 >> testquery |
mas01cr@109 | 36 |
mas01cr@109 | 37 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery > testoutput |
mas01cr@109 | 38 echo testfeature 1 0 1 > test-expected-output |
mas01cr@109 | 39 cmp testoutput test-expected-output |
mas01cr@109 | 40 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery -n 1 > testoutput |
mas01cr@109 | 41 echo testfeature 0 0 1 > test-expected-output |
mas01cr@109 | 42 cmp testoutput test-expected-output |
mas01cr@109 | 43 |
mas01cr@109 | 44 stop_server $! |
mas01cr@109 | 45 |
mas01cr@109 | 46 exit 104 |