Просмотр исходного кода

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 лет назад
Родитель
Сommit
62b5838fc1
1 измененных файлов: 4 добавлений и 4 удалений
  1. +4
    -4
      src/lol/unit.h

+ 4
- 4
src/lol/unit.h Просмотреть файл

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


Загрузка…
Отмена
Сохранить