Facing problems with tests

Richhiey Thomas richhiey.thomas at gmail.com
Sat Jun 18 06:20:04 BST 2016


Hello devs,

I am currently facing a minor issue when writing tests, which I'm not able
to overcome.
I've written my test cases using the DEFINE_TESTCASE macro and there are no
errors while running a make check.
But when I run a make check, it shows me these warnings:

In file included from apitest.h:26:0,
                 from api_cluster.cc:7:
api_cluster.cc: In function ‘bool test_euclidian_distance1()’:
./harness/testsuite.h:285:38: warning: no previous declaration for ‘bool
test_euclidian_distance1()’ [-Wmissing-declarations]
 #define DEFINE_TESTCASE(S,COND) bool test_##S()
                                      ^
api_cluster.cc:16:1: note: in expansion of macro ‘DEFINE_TESTCASE’
 DEFINE_TESTCASE(euclidian_distance1, backend) {
 ^
api_cluster.cc: In function ‘bool test_euclidian_distance2()’:
./harness/testsuite.h:285:38: warning: no previous declaration for ‘bool
test_euclidian_distance2()’ [-Wmissing-declarations]
 #define DEFINE_TESTCASE(S,COND) bool test_##S()
                                      ^
api_cluster.cc:43:1: note: in expansion of macro ‘DEFINE_TESTCASE’
 DEFINE_TESTCASE(euclidian_distance2, backend) {
 ^
api_cluster.cc: In function ‘bool test_round_robin1()’:
./harness/testsuite.h:285:38: warning: no previous declaration for ‘bool
test_round_robin1()’ [-Wmissing-declarations]
 #define DEFINE_TESTCASE(S,COND) bool test_##S()
                                      ^
api_cluster.cc:69:1: note: in expansion of macro ‘DEFINE_TESTCASE’
 DEFINE_TESTCASE(round_robin1, backend)
 ^

If I'm not wrong, the collate-test perl script specified in makefile.am is
supposed to expand the macro and add it to the header file, api_all.h and
api_collated.h. But that doesn't seem to happen in my case.
Could I know how to get around this?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20160618/0ac3fe3f/attachment.html>


More information about the Xapian-devel mailing list