Mercurial > hg > audiodb
diff libtests/0029/prog1.c @ 423:b09d2eb1a2b2 api-inversion
Cheap hackery abounds.
Include an accumulator into the query_loop chain. Somewhat
surprisingly, very few tests fail, and those that do are due to
over-specific reporting requirements in the case of ties, so rewrite
those tests to be more permissive.
There are probably codepaths which ignore the accumulator completely;
they will still work, because the accumulator will return zero points
when it is asked to ->get_points().
author | mas01cr |
---|---|
date | Wed, 24 Dec 2008 10:55:08 +0000 |
parents | 94c18f128ce8 |
children | e072aa1611f5 |
line wrap: on
line diff
--- a/libtests/0029/prog1.c Wed Dec 24 10:55:03 2008 +0000 +++ b/libtests/0029/prog1.c Wed Dec 24 10:55:08 2008 +0000 @@ -223,7 +223,10 @@ /* check the test values */ if (size != 1) {returnval = -1;}; - if (testoneresult(&myadbqueryresult,0,"testfeature",1,0,0)) {returnval = -1;}; + if (testoneresult(&myadbqueryresult,0,"testfeature",1,0,0) && + testoneresult(&myadbqueryresult,0,"testfeature",1,0,2)) { + returnval = -1; + }; //${AUDIODB} -d testdb -Q sequence -l 2 -f testquery -w testquerypower --absolute-threshold=-0.8 -p 1 > testoutput @@ -258,7 +261,10 @@ /* check the test values */ if (size != 1) {returnval = -1;}; - if (testoneresult(&myadbqueryresult,0,"testfeature",1,0,0)) {returnval = -1;}; + if (testoneresult(&myadbqueryresult,0,"testfeature",1,0,0) && + testoneresult(&myadbqueryresult,0,"testfeature",1,0,2)) { + returnval = -1; + };