chromium/third_party/leveldatabase/src/db/log_test.cc

// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#include "gtest/gtest.h"
#include "db/log_reader.h"
#include "db/log_writer.h"
#include "leveldb/env.h"
#include "util/coding.h"
#include "util/crc32c.h"
#include "util/random.h"

namespace leveldb {
namespace log {

// Construct a string of the specified length made out of the supplied
// partial string.
static std::string BigString(const std::string& partial_string, size_t n) {}

// Construct a string from a number
static std::string NumberString(int n) {}

// Return a skewed potentially long string
static std::string RandomSkewedString(int i, Random* rnd) {}

class LogTest : public testing::Test {};

size_t LogTest::initial_offset_record_sizes_[] =;

uint64_t LogTest::initial_offset_last_record_offsets_[] =;

// LogTest::initial_offset_last_record_offsets_ must be defined before this.
int LogTest::num_initial_offset_records_ =;

TEST_F(LogTest, Empty) {}

TEST_F(LogTest, ReadWrite) {}

TEST_F(LogTest, ManyBlocks) {}

TEST_F(LogTest, Fragmentation) {}

TEST_F(LogTest, MarginalTrailer) {}

TEST_F(LogTest, MarginalTrailer2) {}

TEST_F(LogTest, ShortTrailer) {}

TEST_F(LogTest, AlignedEof) {}

TEST_F(LogTest, OpenForAppend) {}

TEST_F(LogTest, RandomRead) {}

// Tests of all the error paths in log_reader.cc follow:

TEST_F(LogTest, ReadError) {}

TEST_F(LogTest, BadRecordType) {}

TEST_F(LogTest, TruncatedTrailingRecordIsIgnored) {}

TEST_F(LogTest, BadLength) {}

TEST_F(LogTest, BadLengthAtEndIsIgnored) {}

TEST_F(LogTest, ChecksumMismatch) {}

TEST_F(LogTest, UnexpectedMiddleType) {}

TEST_F(LogTest, UnexpectedLastType) {}

TEST_F(LogTest, UnexpectedFullType) {}

TEST_F(LogTest, UnexpectedFirstType) {}

TEST_F(LogTest, MissingLastIsIgnored) {}

TEST_F(LogTest, PartialLastIsIgnored) {}

TEST_F(LogTest, SkipIntoMultiRecord) {}

TEST_F(LogTest, ErrorJoinsRecords) {}

TEST_F(LogTest, ReadStart) {}

TEST_F(LogTest, ReadSecondOneOff) {}

TEST_F(LogTest, ReadSecondTenThousand) {}

TEST_F(LogTest, ReadSecondStart) {}

TEST_F(LogTest, ReadThirdOneOff) {}

TEST_F(LogTest, ReadThirdStart) {}

TEST_F(LogTest, ReadFourthOneOff) {}

TEST_F(LogTest, ReadFourthFirstBlockTrailer) {}

TEST_F(LogTest, ReadFourthMiddleBlock) {}

TEST_F(LogTest, ReadFourthLastBlock) {}

TEST_F(LogTest, ReadFourthStart) {}

TEST_F(LogTest, ReadInitialOffsetIntoBlockPadding) {}

TEST_F(LogTest, ReadEnd) {}

TEST_F(LogTest, ReadPastEnd) {}

}  // namespace log
}  // namespace leveldb