瀏覽代碼

lolunit: rename a few methods for consistency.

legacy
Sam Hocevar sam 13 年之前
父節點
當前提交
5a5b811200
共有 4 個文件被更改,包括 6 次插入12 次删除
  1. +4
    -4
      src/lol/unit.h
  2. +0
    -3
      test/half.cpp
  3. +2
    -2
      test/matrix.cpp
  4. +0
    -3
      test/trig.cpp

+ 4
- 4
src/lol/unit.h 查看文件

@@ -37,8 +37,8 @@ class FixtureBase
friend class TextTestRunner; friend class TextTestRunner;


public: public:
virtual void setUp(void) {};
virtual void tearDown(void) {};
virtual void SetUp(void) {};
virtual void TearDown(void) {};


protected: protected:
FixtureBase() : m_next(NULL), m_testcases(0), m_failcases(0) {} FixtureBase() : m_next(NULL), m_testcases(0), m_failcases(0) {}
@@ -193,9 +193,9 @@ public:


for (FixtureBase *f = FixtureBase::FixtureList(); f; f = f->m_next) for (FixtureBase *f = FixtureBase::FixtureList(); f; f = f->m_next)
{ {
f->setUp();
f->SetUp();
f->RunFixture(); f->RunFixture();
f->tearDown();
f->TearDown();


errors << f->m_errorlog.str(); errors << f->m_errorlog.str();
testcases += f->m_testcases; testcases += f->m_testcases;


+ 0
- 3
test/half.cpp 查看文件

@@ -36,9 +36,6 @@ namespace lol
LOLUNIT_FIXTURE(HalfTest) LOLUNIT_FIXTURE(HalfTest)
{ {
public: public:
void setUp() {}
void tearDown() {}

LOLUNIT_TEST(test_half_from_float) LOLUNIT_TEST(test_half_from_float)
{ {
for (size_t i = 0; i < sizeof(pairs) / sizeof(*pairs); i++) for (size_t i = 0; i < sizeof(pairs) / sizeof(*pairs); i++)


+ 2
- 2
test/matrix.cpp 查看文件

@@ -21,7 +21,7 @@ namespace lol
LOLUNIT_FIXTURE(MatrixTest) LOLUNIT_FIXTURE(MatrixTest)
{ {
public: public:
void setUp()
void SetUp()
{ {
identity = mat4(1.0f); identity = mat4(1.0f);
triangular = mat4(vec4(1.0f, 0.0f, 0.0f, 0.0f), triangular = mat4(vec4(1.0f, 0.0f, 0.0f, 0.0f),
@@ -34,7 +34,7 @@ public:
vec4( 5.0f, -3.0f, -7.0f, -6.0f)); vec4( 5.0f, -3.0f, -7.0f, -6.0f));
} }


void tearDown() {}
void TearDown() {}


LOLUNIT_TEST(test_vec_eq) LOLUNIT_TEST(test_vec_eq)
{ {


+ 0
- 3
test/trig.cpp 查看文件

@@ -23,9 +23,6 @@ namespace lol
LOLUNIT_FIXTURE(TrigTest) LOLUNIT_FIXTURE(TrigTest)
{ {
public: public:
void setUp() {}
void tearDown() {}

LOLUNIT_TEST(test_sin) LOLUNIT_TEST(test_sin)
{ {
for (int i = -10000; i < 10000; i++) for (int i = -10000; i < 10000; i++)


Loading…
取消
儲存