Bladeren bron

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 jaren geleden
bovenliggende
commit
62b5838fc1
1 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. +4
    -4
      src/lol/unit.h

+ 4
- 4
src/lol/unit.h Bestand weergeven

@@ -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; \


Laden…
Annuleren
Opslaan