reformat source code

according to code styles, 'AccessModifierOffset' should be -2.
This commit is contained in:
gm
2021-06-16 15:48:42 +08:00
committed by MizuhaHimuraki
parent 8c4a2f26a6
commit 4a92b6d7df
3314 changed files with 23131 additions and 23401 deletions

View File

@ -17,18 +17,18 @@
using namespace oceanbase::common;
class Ob2DArrayTest : public ::testing::Test {
public:
public:
Ob2DArrayTest();
virtual ~Ob2DArrayTest();
virtual void SetUp();
virtual void TearDown();
private:
private:
// disallow copy
Ob2DArrayTest(const Ob2DArrayTest& other);
Ob2DArrayTest& operator=(const Ob2DArrayTest& other);
protected:
protected:
// data members
};

View File

@ -81,7 +81,7 @@ TEST(ObArrayTest, serialize)
}
class TestItem {
public:
public:
static int64_t construct_cnt_;
static int64_t copy_construct_cnt_;
static int64_t destruct_cnt_;

View File

@ -15,7 +15,7 @@
using namespace oceanbase::common;
class TestComp {
public:
public:
int get_error_code()
{
return OB_SUCCESS;
@ -27,18 +27,18 @@ class TestComp {
};
class ObHeapTest : public ::testing::Test {
public:
public:
ObHeapTest();
virtual ~ObHeapTest();
virtual void SetUp();
virtual void TearDown();
private:
private:
// disallow copy
ObHeapTest(const ObHeapTest& other);
ObHeapTest& operator=(const ObHeapTest& other);
private:
private:
// data members
};

View File

@ -15,18 +15,18 @@
using namespace oceanbase::common;
class ObSEArrayTest : public ::testing::Test {
public:
public:
ObSEArrayTest();
virtual ~ObSEArrayTest();
virtual void SetUp();
virtual void TearDown();
private:
private:
// disallow copy
ObSEArrayTest(const ObSEArrayTest& other);
ObSEArrayTest& operator=(const ObSEArrayTest& other);
private:
private:
// data members
};

View File

@ -18,7 +18,7 @@
using namespace oceanbase::common;
class TestObj {
public:
public:
TestObj(int64_t val) : value_(val)
{}
TestObj() : value_(0)
@ -44,24 +44,24 @@ class TestObj {
};
class TestArrayArray : public ::testing::Test {
public:
public:
TestArrayArray();
virtual ~TestArrayArray();
virtual void SetUp();
virtual void TearDown();
private:
private:
// disallow copy
DISALLOW_COPY_AND_ASSIGN(TestArrayArray);
protected:
protected:
// function members
void setup(int64_t N, ObIArray<TestObj>& arr);
void verify(int64_t N, const ObIArray<TestObj>& arr);
void verify(const ObIArray<TestObj>& arr1, const ObIArray<TestObj>& arr2);
void extend_to(const int64_t N, ObIArray<TestObj>& arr);
protected:
protected:
// data members
};

View File

@ -18,7 +18,7 @@
namespace oceanbase {
namespace common {
class TestArrayHelper : public ::testing::Test {
public:
public:
TestArrayHelper()
{}
virtual ~TestArrayHelper()

View File

@ -17,19 +17,19 @@
#include "lib/container/ob_array.h"
using namespace oceanbase::common;
class TestBitSet : public ::testing::Test {
public:
public:
TestBitSet();
virtual ~TestBitSet();
virtual void SetUp();
virtual void TearDown();
private:
private:
// disallow copy
DISALLOW_COPY_AND_ASSIGN(TestBitSet);
protected:
protected:
// function members
protected:
protected:
// data members
};

View File

@ -21,7 +21,7 @@ using namespace common;
namespace unittest {
class TestObBitmap : public ::testing::Test {
public:
public:
static constexpr uint64_t bits_per_memblock()
{
return ObBitmap::BITS_PER_BLOCK * ObBitmap::BLOCKS_PER_MEM_BLOCK;
@ -38,10 +38,10 @@ class TestObBitmap : public ::testing::Test {
static void TearDownTestCase()
{}
protected:
protected:
ModulePageAllocator allocator_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(TestObBitmap);
};

View File

@ -16,7 +16,7 @@
#include "lib/atomic/ob_atomic.h"
using namespace oceanbase::common;
class TestConcurrentBitset : public ::testing::Test {
public:
public:
virtual void SetUp()
{}
virtual void TearDown()
@ -42,7 +42,7 @@ class TestConcurrentBitset : public ::testing::Test {
template <typename bitset_type>
void concurrent_set_find_first_zero_bit(bitset_type& bitset);
protected:
protected:
ObConcurrentBitset<UINT16_MAX> bitset_;
ObConcurrentBitset<UINT16_MAX, true> bitset_lock_;
};

View File

@ -152,7 +152,7 @@ TEST(RINGBUFFER_BASE, debug2)
typedef ValSlot<int64_t> SlotT;
typedef ObExtendibleRingBufferBase<int64_t, SlotT> I64RBBASE;
class SetRunnable : public cotesting::DefaultRunnable {
public:
public:
void run1() final
{
for (int64_t idx = 0; idx < cnt_; ++idx) {
@ -165,7 +165,7 @@ class SetRunnable : public cotesting::DefaultRunnable {
int64_t cnt_;
};
class PopRunnable : public cotesting::DefaultRunnable {
public:
public:
struct PopCond {
int64_t expect_;
/*
@ -292,7 +292,7 @@ TEST(RingBuffer, debug)
// Hazrd Ptr Tests.
struct TypeA : public erb::HazardBase {
public:
public:
virtual int purge()
{
return 0;
@ -324,7 +324,7 @@ TEST(HazPtr, Basic0)
}
struct TypeB : public erb::HazardBase {
public:
public:
virtual int purge()
{
if (!alloc_) {
@ -336,7 +336,7 @@ struct TypeB : public erb::HazardBase {
bool alloc_;
};
class PurgeTestA : public cotesting::DefaultRunnable {
public:
public:
void run1() final
{
while (!ATOMIC_LOAD(&acquire_)) {

View File

@ -18,23 +18,23 @@
using namespace oceanbase::common;
class TestIArray : public ::testing::Test {
public:
public:
TestIArray();
virtual ~TestIArray();
virtual void SetUp();
virtual void TearDown();
private:
private:
// disallow copy
DISALLOW_COPY_AND_ASSIGN(TestIArray);
protected:
protected:
// function members
template <typename T>
void setup(int32_t N, T& arr);
void verify(int32_t N, const ObIArray<int32_t>& arr);
protected:
protected:
// data members
};

View File

@ -16,23 +16,23 @@
using namespace oceanbase::common;
class ObLoserTreeTest : public ::testing::Test {
public:
public:
ObLoserTreeTest(){};
virtual ~ObLoserTreeTest(){};
virtual void SetUp(){};
virtual void TearDown(){};
private:
private:
// disallow copy
ObLoserTreeTest(const ObLoserTreeTest& other);
ObLoserTreeTest& operator=(const ObLoserTreeTest& other);
private:
private:
// data members
};
class TestMaxComp {
public:
public:
int get_error_code()
{
return OB_SUCCESS;

View File

@ -21,7 +21,7 @@ using obsys::CThread;
using oceanbase::lib::ThreadPool;
class TestRingBuffer : public ::testing::Test, public ThreadPool {
public:
public:
struct RBData {
RBData() : valid_(0), val_(0)
{}
@ -117,7 +117,7 @@ class TestRingBuffer : public ::testing::Test, public ThreadPool {
mix();
}
private:
private:
int64_t seq_ CACHE_ALIGNED;
int64_t limit_;
RingArray rbuffer_;