瀏覽代碼

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 年之前
父節點
當前提交
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; \


Loading…
取消
儲存