Parcourir la 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 il y a 13 ans
Parent
révision
62b5838fc1
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. +4
    -4
      src/lol/unit.h

+ 4
- 4
src/lol/unit.h Voir le fichier

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


Chargement…
Annuler
Enregistrer