Mercurial > hg > audiodb
view tests/0003/run-test.sh @ 469:d3afc91d205d api-inversion
Move audioDB::query over to audioDB.cpp
At the same time, remove all the abstraction violations in
audioDB::query, which came in two flavours: use of dbH->numFiles, which
is dealt with by getting the database status instead (and is eventually
unnecessary, being only needed now because reporters are implemented in
terms of vectors indexed by ID), and use of fileTable in reporter's
report functions (dealt with by passing in the adb instead).
To actually implement reporting as of now, we continue to use stuff from
audioDB-internals.h; maybe someday we will be clean and shiny.
author | mas01cr |
---|---|
date | Wed, 31 Dec 2008 15:44:16 +0000 |
parents | fe4dc39b2dd7 |
children |
line wrap: on
line source
#! /bin/bash . ../test-utils.sh if [ -f testdb ]; then rm -f testdb; fi ${AUDIODB} -d testdb -N # point query now implemented as sequence search ${AUDIODB} -d testdb -L # We could contemplate putting the test feature (and the expected # query output) under svn control if we trust its binary file # handling. # FIXME: endianness! intstring 1 > testfeature floatstring 1 >> testfeature ${AUDIODB} -d testdb -I -f testfeature ${AUDIODB} -d testdb -Q point -f testfeature > test-query-output echo testfeature 1 0 0 > test-expected-query-output cmp test-query-output test-expected-query-output # failure cases expect_clean_error_exit ${AUDIODB} -d testdb -I expect_clean_error_exit ${AUDIODB} -d testdb -f testfeature expect_clean_error_exit ${AUDIODB} -I -f testfeature expect_clean_error_exit ${AUDIODB} -d testdb -Q notpoint -f testfeature expect_clean_error_exit ${AUDIODB} -Q point -f testfeature exit 104