Missing Assert Macro References

Added by Jim Jurkovich almost 3 years ago

I did a CUTE install. All I installed was CUTE Headers (v1.7) and CUTE Plugin. I can run the simple sample test which only requires ASSERTM and ASSERT_EQUALS. I then tried to expand the test to include one of the other referenced ASSERT Macros that are supposed to be supported (ASSERT_NOT_EQUAL_TO) and I get the error the function could not be resolved. I looked at the cute directory contents that gets created when I make a new C++ Cute Project and it has some includes in it but none of them has the macro I am looking for. I am installing in Eclipse Indigo. In the includes in the cute directory all I see for macros is:
ASSERT and ASSERTM in cute_base.h
ASSERT_EQUALM, ASSERT_EQUAL, ASSERT_DELTA, and ASSERT_DELTAM

Where can the other ASSERTS be found. The list that is to exist is:
ASSERTM
ASSERT
ASSERT_EQUALM(msg, cond)
ASSERT_EQUAL(cond)
ASSERT_EQUAL_DELTAM(msg, expected, actual, delta)
ASSERT_EQUAL_DELTA(expected, actual, delta)
ASSERT_GREATERM(msg, left, right)
ASSERT_GREATER(left, right)
ASSERT_GREATER_EQUALM(msg, left, right)
ASSERT_GREATER_EQUAL(left, right)
ASSERT_LESSM(msg, left, right)
ASSERT_LESS(left, right)
ASSERT_LESS_EQUAL(left, right)
ASSERT_LESS_EQUALM(msg, left, right)
ASSERT_THROWS(code, exc)
ASSERT_THROWSM(msg, code, exc)
FAIL
FAILM
ASSERT*_DDT(cond, failure)
ASSERT*_DDTM(msg, cond, failure)
ASSERT_NOT_EQUAL_TO(left, right)
ASSERT_NOT_EQUAL_TOM(msg, left, right)

By the way is there some description for these macros so I can make sure I get the calling arguments correct. For example, I am not sure what left and right are supposed to be.


Replies (3)

RE: Missing Assert Macro References - Added by Thomas Corbat almost 3 years ago

Hi Jim

The asserts are located as follows:
  • cute_base.h: ASSERT, ASSERTM, FAIL, FAILM
  • cute_equals.h: ASSERT_EQUAL, ASSERT_EQUALM, ASSERT_EQUAL_DELTA, ASSERT_EQUAL_DELTAM
  • cute_relops.h (Headers 2.0 only): ASSERT_LESS, ASSERT_LESSM, ASSERT_LESS_EQUAL, ASSERT_LESS_EQUALM, ASSERT_GREATER, ASSERT_GREATERM, ASSERT_GREATER_EQUAL, ASSERT_GREATER_EQUALM, ASSERT_NOT_EQUAL_TO, ASSERT_NOT_EQUAL_TOM
  • cute_data_driven.h (Headers 2.0 only): All DDT asserts

We have a short description of the macros here: http://www.cute-test.com/projects/cute/wiki/Writing_and_Running_CUTE_Unit_Test_Suites
Left and right are conceptually the left and right operand of the corresponding comparison operation. E.g. ASSERT_LESS(left, right) can be fathomed as left < right.

Regards
Thomas

RE: Missing Assert Macro References - Added by Jim Jurkovich almost 3 years ago

That is good that they are in the 2.0 headers, however, I cannot seem to get to them. I am using an Eclipse Indigo version and the only versions for headers are versions 1.5 to 1.7. I am not sure where to go to get the 2.0 versions. I would have thought they are independent of Eclipse versions. I went through the various updatesites for each of the Eclipse versions and some Eclipse versions do not have any selection for headers just the plugin and options.

RE: Missing Assert Macro References - Added by Thomas Corbat almost 3 years ago

We have changed the way of delivering the headers from separate plug-ins to ship them with the CUTE plug-in itself in the Kepler release. This was also the first release of the headers 2.0.0. You can still get the headers separately at: http://www.cute-test.com/projects/cute/wiki/CUTE_standalone

(1-3/3)