Browse Source

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.
legacy
Sam Hocevar sam 13 years ago
parent
commit
62b5838fc1
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/lol/unit.h

+ 4
- 4
src/lol/unit.h View File

@@ -226,8 +226,8 @@ public:
<< " (F) line: " << __LINE__ << " " \
<< __FILE__ << std::endl; \
m_errorlog << "equality assertion failed" << std::endl; \
m_errorlog << "- Expected: " << (b) << std::endl; \
m_errorlog << "- Actual : " << (a) << std::endl; \
m_errorlog << "- Expected: " << (a) << std::endl; \
m_errorlog << "- Actual : " << (b) << std::endl; \
m_errorlog << message; \
m_failure = true; \
return; \
@@ -245,8 +245,8 @@ public:
<< " (F) line: " << __LINE__ << " " \
<< __FILE__ << std::endl; \
m_errorlog << "double equality assertion failed" << std::endl; \
m_errorlog << "- Expected: " << (b) << std::endl; \
m_errorlog << "- Actual : " << (a) << std::endl; \
m_errorlog << "- Expected: " << (a) << std::endl; \
m_errorlog << "- Actual : " << (b) << std::endl; \
m_errorlog << "- Delta : " << (t) << std::endl; \
m_errorlog << message; \
m_failure = true; \


Loading…
Cancel
Save