#include "leveldb/table.h"
#include <map>
#include <string>
#include "gtest/gtest.h"
#include "db/dbformat.h"
#include "db/memtable.h"
#include "db/write_batch_internal.h"
#include "leveldb/db.h"
#include "leveldb/env.h"
#include "leveldb/iterator.h"
#include "leveldb/options.h"
#include "leveldb/table_builder.h"
#include "table/block.h"
#include "table/block_builder.h"
#include "table/format.h"
#include "util/random.h"
#include "util/testutil.h"
namespace leveldb {
static std::string Reverse(const Slice& key) { … }
namespace {
class ReverseKeyComparator : public Comparator { … };
}
static ReverseKeyComparator reverse_key_comparator;
static void Increment(const Comparator* cmp, std::string* key) { … }
namespace {
struct STLLessThan { … };
}
class StringSink : public WritableFile { … };
class StringSource : public RandomAccessFile { … };
KVMap;
class Constructor { … };
class BlockConstructor : public Constructor { … };
class TableConstructor : public Constructor { … };
class KeyConvertingIterator : public Iterator { … };
class MemTableConstructor : public Constructor { … };
class DBConstructor : public Constructor { … };
enum TestType { … };
struct TestArgs { … };
static const TestArgs kTestArgList[] = …;
static const int kNumTestArgs = …;
class Harness : public testing::Test { … };
TEST_F(Harness, Empty) { … }
TEST_F(Harness, ZeroRestartPointsInBlock) { … }
TEST_F(Harness, SimpleEmptyKey) { … }
TEST_F(Harness, SimpleSingle) { … }
TEST_F(Harness, SimpleMulti) { … }
TEST_F(Harness, SimpleSpecialKey) { … }
TEST_F(Harness, Randomized) { … }
TEST_F(Harness, RandomizedLongDB) { … }
TEST(MemTableTest, Simple) { … }
static bool Between(uint64_t val, uint64_t low, uint64_t high) { … }
TEST(TableTest, ApproximateOffsetOfPlain) { … }
static bool CompressionSupported(CompressionType type) { … }
class CompressionTableTest
: public ::testing::TestWithParam<std::tuple<CompressionType>> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(CompressionTableTest, ApproximateOffsetOfCompressed) { … }
}