Search code examples
c++cppunit

Doing a "less than" test with CppUnit


I am new to CppUnit. Is there any way to assert that a value must be less than zero? I am looking for something with similar behavior to CPPUNIT_ASSERT_EQUAL(). I was thinking there might be a test function named something like CPPUNIT_ASSERT_LESS_THAN().


Solution

  • How about CPPUNIT_ASSERT(variable < 0);?