The TestAssert class has a few methods (and macros) which are the "core" of CppUnit failure reporting.
I am surprised that the assertEquals methods only exist for "double" and "long" types. What about an assertEquals method for "string" type? Is there a precise reason for the omission?
The assertEquals methods are more user-friendly because they allow to see the expected and the got value.
Wouldn't it be interesting to add it in the framework?
Thanks in advance.
Bruno.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've wondered that myself, and I checked the CVS version, and I noticed it had been improved nicely in that area. That's actually why I asked in this forum about the stability of the CVS version and about when to expect the next release. Unfortunately the entire project, including this forum, seems to be , erhm.. hypernating. Consequently I chose to add a templated assertEquals myself. I've just added a templated assertEquals method and a matching macro wrapper.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
The TestAssert class has a few methods (and macros) which are the "core" of CppUnit failure reporting.
I am surprised that the assertEquals methods only exist for "double" and "long" types. What about an assertEquals method for "string" type? Is there a precise reason for the omission?
The assertEquals methods are more user-friendly because they allow to see the expected and the got value.
Wouldn't it be interesting to add it in the framework?
Thanks in advance.
Bruno.
I've wondered that myself, and I checked the CVS version, and I noticed it had been improved nicely in that area. That's actually why I asked in this forum about the stability of the CVS version and about when to expect the next release. Unfortunately the entire project, including this forum, seems to be , erhm.. hypernating. Consequently I chose to add a templated assertEquals myself. I've just added a templated assertEquals method and a matching macro wrapper.