More TEST Condition Checks
11 Oct 2013, 22:26
Richard Hagberg (3 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 driver 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.
What does everyone else think?
|You must be logged in to comment|