[quagga-dev 10824] Re: Test cases for isis_pdu.c.

Christian Franke nobody at nowhere.ws
Mon Oct 21 18:34:34 BST 2013


On 10/13/2013 01:42 AM, Chamara Philips wrote:
> I just started testing isis_pdu.c. please go through these and tell whether
> this approach is correct. I am new to Quagga, but I am willing to
> participate.

Thank you very much for your interest and especially for writing tests.
Improving those is a job that few people really like to do and it's
quite necessary.

I spent some time trying to make your code compile - however it seems
that I am somehow missing the area_address_compare function that you are
using.

I general, I would suggest to put the test files into the tests
directory. And if you have functions like "test_dif_area_set_ret0" that
you will only call once from a single test program, there usually isn't
much of a need to write a header or prototypes. Just make it "static int
test_dif_area_set_ret0(void) {...}" and you'll be good. (Using
"funcname(void)" instead of "funcname()" when defining a function that
doesn't take any arguments avoids you a compiler warning)

-Christian




More information about the Quagga-dev mailing list