Changeset 925


Ignore:
Timestamp:
Sep 8, 2011, 9:18:31 AM (8 years ago)
Author:
sam
Message:

lolunit: reverse the expected/actual logic.

CPPUNIT_ASSERT_EQUAL(a, b) “expects” the value “a” and fails if “b” is
different. The logic seems backwards to me, but matching CppUnit’s
output is important so I’m doing the same in LolUnit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lol/unit.h

    r924 r925  
    227227                       << __FILE__ << std::endl; \
    228228            m_errorlog << "equality assertion failed" << std::endl; \
    229             m_errorlog << "- Expected: " << (b) << std::endl; \
    230             m_errorlog << "- Actual  : " << (a) << std::endl; \
     229            m_errorlog << "- Expected: " << (a) << std::endl; \
     230            m_errorlog << "- Actual  : " << (b) << std::endl; \
    231231            m_errorlog << message; \
    232232            m_failure = true; \
     
    246246                       << __FILE__ << std::endl; \
    247247            m_errorlog << "double equality assertion failed" << std::endl; \
    248             m_errorlog << "- Expected: " << (b) << std::endl; \
    249             m_errorlog << "- Actual  : " << (a) << std::endl; \
     248            m_errorlog << "- Expected: " << (a) << std::endl; \
     249            m_errorlog << "- Actual  : " << (b) << std::endl; \
    250250            m_errorlog << "- Delta   : " << (t) << std::endl; \
    251251            m_errorlog << message; \
Note: See TracChangeset for help on using the changeset viewer.