Menu

assert methods and macros

Freud
2001-07-30
2001-08-07
  • Freud

    Freud - 2001-07-30

    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.

     
    • Thomas Sondergaard

      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.

       

Log in to post a comment.