11 static std::string
IKey(
const std::string& user_key,
19 static std::string
Shorten(
const std::string& s,
const std::string& l) {
20 std::string result = s;
26 std::string result = s;
31 static void TestKey(
const std::string& key,
34 std::string encoded =
IKey(key, seq, vt);
50 const char* keys[] = {
"",
"k",
"hello",
"longggggggggggggggggggggg" };
51 const uint64_t seq[] = {
53 (1ull << 8) - 1, 1ull << 8, (1ull << 8) + 1,
54 (1ull << 16) - 1, 1ull << 16, (1ull << 16) + 1,
55 (1ull << 32) - 1, 1ull << 32, (1ull << 32) + 1
57 for (
int k = 0; k <
sizeof(keys) /
sizeof(keys[0]); k++) {
58 for (
int s = 0; s <
sizeof(seq) /
sizeof(seq[0]); s++) {
110 int main(
int argc,
char** argv) {
static const SequenceNumber kMaxSequenceNumber
static std::string Shorten(const std::string &s, const std::string &l)
virtual void FindShortSuccessor(std::string *key) const
std::string ToString() const
bool ParseInternalKey(const Slice &internal_key, ParsedInternalKey *result)
void AppendInternalKey(std::string *result, const ParsedInternalKey &key)
static std::string ShortSuccessor(const std::string &s)
static const ValueType kValueTypeForSeek
virtual void FindShortestSeparator(std::string *start, const Slice &limit) const
TEST(AutoCompactTest, ReadAll)
const Comparator * BytewiseComparator()
static void TestKey(const std::string &key, uint64_t seq, ValueType vt)
static std::string IKey(const std::string &user_key, uint64_t seq, ValueType vt)