#include <stdio.h>
#include <stdlib.h>
#include <sstream>
#include "leveldb/env.h"
#include "leveldb/slice.h"
#include "util/random.h"
Go to the source code of this file.
|
| #define | BINARY_OP(name, op) |
| |
| #define | ASSERT_TRUE(c) ::leveldb::test::Tester(__FILE__, __LINE__).Is((c), #c) |
| |
| #define | ASSERT_OK(s) ::leveldb::test::Tester(__FILE__, __LINE__).IsOk((s)) |
| |
| #define | ASSERT_EQ(a, b) ::leveldb::test::Tester(__FILE__, __LINE__).IsEq((a),(b)) |
| |
| #define | ASSERT_NE(a, b) ::leveldb::test::Tester(__FILE__, __LINE__).IsNe((a),(b)) |
| |
| #define | ASSERT_GE(a, b) ::leveldb::test::Tester(__FILE__, __LINE__).IsGe((a),(b)) |
| |
| #define | ASSERT_GT(a, b) ::leveldb::test::Tester(__FILE__, __LINE__).IsGt((a),(b)) |
| |
| #define | ASSERT_LE(a, b) ::leveldb::test::Tester(__FILE__, __LINE__).IsLe((a),(b)) |
| |
| #define | ASSERT_LT(a, b) ::leveldb::test::Tester(__FILE__, __LINE__).IsLt((a),(b)) |
| |
| #define | TCONCAT(a, b) TCONCAT1(a,b) |
| |
| #define | TCONCAT1(a, b) a##b |
| |
| #define | TEST(base, name) |
| |
§ ASSERT_EQ
§ ASSERT_GE
§ ASSERT_GT
§ ASSERT_LE
§ ASSERT_LT
§ ASSERT_NE
§ ASSERT_OK
§ ASSERT_TRUE
§ BINARY_OP
| #define BINARY_OP |
( |
|
name, |
|
|
|
op |
|
) |
| |
Value:template <class X, class Y> \
Tester& name(const X& x, const Y& y) { \
if (! (x op y)) { \
ss_ << " failed: " << x << (" " #op " ") << y; \
ok_ = false; \
} \
return *this; \
}
Definition at line 77 of file testharness.h.
§ TCONCAT
§ TCONCAT1
| #define TCONCAT1 |
( |
|
a, |
|
|
|
b |
|
) |
| a##b |
§ TEST
| #define TEST |
( |
|
base, |
|
|
|
name |
|
) |
| |
Value:class TCONCAT(_Test_,name) :
public base { \
public: \
void _Run(); \
static void _RunIt() { \
TCONCAT(_Test_,name) t; \
t._Run(); \
} \
}; \
bool TCONCAT(_Test_ignored_,name) = \
void TCONCAT(_Test_,name)::_Run()
bool RegisterTest(const char *base, const char *name, void(*func)())
Definition at line 117 of file testharness.h.