change: change code style to Linux style except indent.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "node/project.h"
|
||||
#include "render/rendermanager.h"
|
||||
|
||||
namespace olive {
|
||||
namespace olive
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -22,28 +22,29 @@
|
||||
|
||||
#include "common/digit.h"
|
||||
|
||||
namespace olive {
|
||||
namespace olive
|
||||
{
|
||||
|
||||
OLIVE_ADD_TEST(DigitTest)
|
||||
{
|
||||
OLIVE_ASSERT(GetDigitCount(1) == 1);
|
||||
OLIVE_ASSERT(GetDigitCount(69) == 2);
|
||||
OLIVE_ASSERT(GetDigitCount(420) == 3);
|
||||
OLIVE_ASSERT(GetDigitCount(1337) == 4);
|
||||
OLIVE_ASSERT(GetDigitCount(80085) == 5);
|
||||
OLIVE_ASSERT(GetDigitCount(555555) == 6);
|
||||
OLIVE_ASSERT(GetDigitCount(8675309) == 7);
|
||||
OLIVE_ASSERT(GetDigitCount(78956423) == 8);
|
||||
OLIVE_ASSERT(GetDigitCount(148497523) == 9);
|
||||
OLIVE_ASSERT(GetDigitCount(4845821233) == 10);
|
||||
OLIVE_ASSERT(GetDigitCount(18002738255) == 11);
|
||||
OLIVE_ASSERT(GetDigitCount(180027382556) == 12);
|
||||
OLIVE_ASSERT(GetDigitCount(1800273825568) == 13);
|
||||
OLIVE_ASSERT(GetDigitCount(18002738255685) == 14);
|
||||
OLIVE_ASSERT(GetDigitCount(180027382556857) == 15);
|
||||
OLIVE_ASSERT(GetDigitCount(1800273825564857) == 16);
|
||||
OLIVE_ASSERT(GetDigitCount(1) == 1);
|
||||
OLIVE_ASSERT(GetDigitCount(69) == 2);
|
||||
OLIVE_ASSERT(GetDigitCount(420) == 3);
|
||||
OLIVE_ASSERT(GetDigitCount(1337) == 4);
|
||||
OLIVE_ASSERT(GetDigitCount(80085) == 5);
|
||||
OLIVE_ASSERT(GetDigitCount(555555) == 6);
|
||||
OLIVE_ASSERT(GetDigitCount(8675309) == 7);
|
||||
OLIVE_ASSERT(GetDigitCount(78956423) == 8);
|
||||
OLIVE_ASSERT(GetDigitCount(148497523) == 9);
|
||||
OLIVE_ASSERT(GetDigitCount(4845821233) == 10);
|
||||
OLIVE_ASSERT(GetDigitCount(18002738255) == 11);
|
||||
OLIVE_ASSERT(GetDigitCount(180027382556) == 12);
|
||||
OLIVE_ASSERT(GetDigitCount(1800273825568) == 13);
|
||||
OLIVE_ASSERT(GetDigitCount(18002738255685) == 14);
|
||||
OLIVE_ASSERT(GetDigitCount(180027382556857) == 15);
|
||||
OLIVE_ASSERT(GetDigitCount(1800273825564857) == 16);
|
||||
|
||||
OLIVE_TEST_END;
|
||||
OLIVE_TEST_END;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+9
-2
@@ -22,8 +22,15 @@
|
||||
|
||||
#define OLIVE_TEST_SUCCESS -1
|
||||
|
||||
#define OLIVE_ASSERT(x) if (!(x)) return __LINE__
|
||||
#define OLIVE_ASSERT_EQUAL(x, y) if (x != y) {std::cout << " - Equal assert failed: " << x << " != " << y; return __LINE__;}void()
|
||||
#define OLIVE_ASSERT(x) \
|
||||
if (!(x)) \
|
||||
return __LINE__
|
||||
#define OLIVE_ASSERT_EQUAL(x, y) \
|
||||
if (x != y) { \
|
||||
std::cout << " - Equal assert failed: " << x << " != " << y; \
|
||||
return __LINE__; \
|
||||
} \
|
||||
void()
|
||||
#define OLIVE_TEST_END return OLIVE_TEST_SUCCESS
|
||||
|
||||
#define OLIVE_ADD_TEST(x) int Test##x()
|
||||
|
||||
+455
-428
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user