17 Jan 2014, 23:48
Generic-user-small

Richard Hagberg (10 posts)

I am currently using CppUTest to do TDD and I think it would be very handy to have a few more TEST Condition checks. For instance, I have some code that receives bytes and puts them in a buffer. When the buffer is full, the buffer is sent to a USB driver to be transmitted, and the the alternate buffer begins to be filled with the received bytes. I would like a POINTERS_NOT_EQUAL condition check. I could then use it to make sure that after the first buffer is sent to the USB driver, or driver spy in my test, that the code isn’t still using the transmitted buffer as the current data buffer. In such a case, I want to make sure the two pointers are NOT equal. Right now I can use CHECK_FALSE, or CHECK_TRUE, but I think it would make the tests a little more clear if there were inverses for many of the checks.

CHECK_NOT_EQUAL

STRCMP_NOT_EQUAL

LONGS_NOT_EQUAL

BYTES_NOT_EQUAL

POINTERS_NOT_EQUAL

DOUBLES_NOT_EQUAL

What does everyone else think?

10 Dec 2013, 03:29
James2009_pragsmall

James Grenning (141 posts)

Hi Richard

those look like good suggestions. You should post these suggestions at the cpputest google group.

https://groups.google.com/forum/#!forum/cpputest

thanks, James

17 Jan 2014, 23:49
Generic-user-small

Richard Hagberg (10 posts)

Thanks James, I will try and do that.

Richard.

  You must be logged in to comment