diff --git a/tensorflow/core/lib/strings/ordered_code_test.cc b/tensorflow/core/lib/strings/ordered_code_test.cc index adb3b8d9437..fee8a6f93e9 100644 --- a/tensorflow/core/lib/strings/ordered_code_test.cc +++ b/tensorflow/core/lib/strings/ordered_code_test.cc @@ -29,8 +29,9 @@ limitations under the License. namespace tensorflow { namespace strings { +namespace { -static string RandomString(random::SimplePhilox* rnd, size_t len) { +string RandomString(random::SimplePhilox* rnd, size_t len) { string x; for (size_t i = 0; i < len; i++) { x += rnd->Uniform(256); @@ -43,9 +44,9 @@ static string RandomString(random::SimplePhilox* rnd, size_t len) { // Read/WriteIncreasing are defined for string, uint64, int64 below. template -static void OCWriteIncreasing(string* dest, const T& val); +void OCWriteIncreasing(string* dest, const T& val); template -static bool OCReadIncreasing(StringPiece* src, T* result); +bool OCReadIncreasing(StringPiece* src, T* result); // Read/WriteIncreasing template <> @@ -98,7 +99,7 @@ bool OCRead(StringPiece* s, T* val) { // Numbers template -static T TestRead(const string& a) { +T TestRead(const string& a) { // gracefully reject any proper prefix of an encoding for (int i = 0; i < a.size() - 1; ++i) { StringPiece s(a.data(), i); @@ -114,14 +115,14 @@ static T TestRead(const string& a) { } template -static void TestWriteRead(T expected) { +void TestWriteRead(T expected) { EXPECT_EQ(expected, TestRead(OCWrite(expected))); } // Verifies that the second Write* call appends a non-empty string to its // output. template -static void TestWriteAppends(T first, U second) { +void TestWriteAppends(T first, U second) { string encoded; OCWriteToString(&encoded, first); string encoded_first_only = encoded; @@ -131,7 +132,7 @@ static void TestWriteAppends(T first, U second) { } template -static void TestNumbers(T multiplier) { +void TestNumbers(T multiplier) { // first test powers of 2 (and nearby numbers) for (T x = std::numeric_limits().max(); x != 0; x /= 2) { TestWriteRead(multiplier * (x - 1)); @@ -158,10 +159,10 @@ static void TestNumbers(T multiplier) { } // Return true iff 'a' is "before" 'b' -static bool CompareStrings(const string& a, const string& b) { return (a < b); } +bool CompareStrings(const string& a, const string& b) { return (a < b); } template -static void TestNumberOrdering() { +void TestNumberOrdering() { // first the negative numbers (if T is signed, otherwise no-op) string laststr = OCWrite(std::numeric_limits().min()); for (T num = std::numeric_limits().min() / 2; num != 0; num /= 2) { @@ -197,13 +198,20 @@ static void TestNumberOrdering() { } // Helper routine for testing TEST_SkipToNextSpecialByte -static size_t FindSpecial(const string& x) { +size_t FindSpecial(const string& x) { const char* p = x.data(); const char* limit = p + x.size(); const char* result = OrderedCode::TEST_SkipToNextSpecialByte(p, limit); return result - p; } +// Helper function template to create strings from string literals (excluding +// the terminal zero byte of the underlying character array). +template +string ByteSequence(const char (&arr)[N]) { + return string(arr, N - 1); +} + TEST(OrderedCode, SkipToNextSpecialByte) { for (size_t len = 0; len < 256; len++) { random::PhiloxRandom philox(301, 17); @@ -286,7 +294,7 @@ TEST(Int64, EncodeDecode) { TEST(Int64, Ordering) { TestNumberOrdering(); } // Returns the bitwise complement of s. -static inline string StrNot(const string& s) { +inline string StrNot(const string& s) { string result; for (string::const_iterator it = s.begin(); it != s.end(); ++it) result.push_back(~*it); @@ -294,9 +302,9 @@ static inline string StrNot(const string& s) { } template -static void TestInvalidEncoding(const string& s) { +void TestInvalidEncoding(const string& s) { StringPiece p(s); - EXPECT_FALSE(OCRead(&p, static_cast(nullptr))); + EXPECT_FALSE(OCRead(&p, nullptr)); EXPECT_EQ(s, p); } @@ -360,15 +368,15 @@ TEST(OrderedCodeInvalidEncodingsDeathTest, NonCanonical) { // Returns random number with specified number of bits, // i.e., in the range [2^(bits-1),2^bits). -static uint64 NextBits(random::SimplePhilox* rnd, int bits) { +uint64 NextBits(random::SimplePhilox* rnd, int bits) { return (bits != 0) ? (rnd->Rand64() % (1LL << (bits - 1))) + (1LL << (bits - 1)) : 0; } template -static void BM_WriteNum(int n, T multiplier) { - static const int kValues = 64; +void BM_WriteNum(int n, T multiplier) { + constexpr int kValues = 64; T values[kValues]; random::PhiloxRandom philox(301, 17); random::SimplePhilox rnd(&philox); @@ -386,12 +394,12 @@ static void BM_WriteNum(int n, T multiplier) { } template -static void BM_ReadNum(int n, T multiplier) { +void BM_ReadNum(int n, T multiplier) { string x; random::PhiloxRandom philox(301, 17); random::SimplePhilox rnd(&philox); // Use enough distinct values to confuse the branch predictor - static const int kValues = 64; + constexpr int kValues = 64; string values[kValues]; for (int i = 0; i < kValues; i++) { T val = NextBits(&rnd, i % 64) * multiplier; @@ -405,10 +413,10 @@ static void BM_ReadNum(int n, T multiplier) { } } -#define BENCHMARK_NUM(name, T, multiplier) \ - static void BM_Write##name(int n) { BM_WriteNum(n, multiplier); } \ - BENCHMARK(BM_Write##name); \ - static void BM_Read##name(int n) { BM_ReadNum(n, multiplier); } \ +#define BENCHMARK_NUM(name, T, multiplier) \ + void BM_Write##name(int n) { BM_WriteNum(n, multiplier); } \ + BENCHMARK(BM_Write##name); \ + void BM_Read##name(int n) { BM_ReadNum(n, multiplier); } \ BENCHMARK(BM_Read##name) BENCHMARK_NUM(NumIncreasing, uint64, 1); @@ -457,10 +465,10 @@ TEST(String, EncodeDecode) { } } -// 'str' is a static C-style string that may contain '\0' +// 'str' is a string literal that may contain '\0'. #define STATIC_STR(str) StringPiece((str), sizeof(str) - 1) -static string EncodeStringIncreasing(StringPiece value) { +string EncodeStringIncreasing(StringPiece value) { string encoded; OrderedCode::WriteString(&encoded, value); return encoded; @@ -524,204 +532,221 @@ TEST(EncodingIsExpected, String) { TEST(EncodingIsExpected, Unsigned) { std::vector> data = { - {0x0ull, string("\000", 1)}, - {0x1ull, string("\001\001", 2)}, - {0x2ull, string("\001\002", 2)}, - {0x1ull, string("\001\001", 2)}, - {0x2ull, string("\001\002", 2)}, - {0x3ull, string("\001\003", 2)}, - {0x3ull, string("\001\003", 2)}, - {0x4ull, string("\001\004", 2)}, - {0x5ull, string("\001\005", 2)}, - {0x7ull, string("\001\007", 2)}, - {0x8ull, string("\001\010", 2)}, - {0x9ull, string("\001\t", 2)}, - {0xfull, string("\001\017", 2)}, - {0x10ull, string("\001\020", 2)}, - {0x11ull, string("\001\021", 2)}, - {0x1full, string("\001\037", 2)}, - {0x20ull, string("\001 ", 2)}, - {0x21ull, string("\001!", 2)}, - {0x3full, string("\001?", 2)}, - {0x40ull, string("\001@", 2)}, - {0x41ull, string("\001A", 2)}, - {0x7full, string("\001\177", 2)}, - {0x80ull, string("\001\200", 2)}, - {0x81ull, string("\001\201", 2)}, - {0xffull, string("\001\377", 2)}, - {0x100ull, string("\002\001\000", 3)}, - {0x101ull, string("\002\001\001", 3)}, - {0x1ffull, string("\002\001\377", 3)}, - {0x200ull, string("\002\002\000", 3)}, - {0x201ull, string("\002\002\001", 3)}, - {0x3ffull, string("\002\003\377", 3)}, - {0x400ull, string("\002\004\000", 3)}, - {0x401ull, string("\002\004\001", 3)}, - {0x7ffull, string("\002\007\377", 3)}, - {0x800ull, string("\002\010\000", 3)}, - {0x801ull, string("\002\010\001", 3)}, - {0xfffull, string("\002\017\377", 3)}, - {0x1000ull, string("\002\020\000", 3)}, - {0x1001ull, string("\002\020\001", 3)}, - {0x1fffull, string("\002\037\377", 3)}, - {0x2000ull, string("\002 \000", 3)}, - {0x2001ull, string("\002 \001", 3)}, - {0x3fffull, string("\002?\377", 3)}, - {0x4000ull, string("\002@\000", 3)}, - {0x4001ull, string("\002@\001", 3)}, - {0x7fffull, string("\002\177\377", 3)}, - {0x8000ull, string("\002\200\000", 3)}, - {0x8001ull, string("\002\200\001", 3)}, - {0xffffull, string("\002\377\377", 3)}, - {0x10000ull, string("\003\001\000\000", 4)}, - {0x10001ull, string("\003\001\000\001", 4)}, - {0x1ffffull, string("\003\001\377\377", 4)}, - {0x20000ull, string("\003\002\000\000", 4)}, - {0x20001ull, string("\003\002\000\001", 4)}, - {0x3ffffull, string("\003\003\377\377", 4)}, - {0x40000ull, string("\003\004\000\000", 4)}, - {0x40001ull, string("\003\004\000\001", 4)}, - {0x7ffffull, string("\003\007\377\377", 4)}, - {0x80000ull, string("\003\010\000\000", 4)}, - {0x80001ull, string("\003\010\000\001", 4)}, - {0xfffffull, string("\003\017\377\377", 4)}, - {0x100000ull, string("\003\020\000\000", 4)}, - {0x100001ull, string("\003\020\000\001", 4)}, - {0x1fffffull, string("\003\037\377\377", 4)}, - {0x200000ull, string("\003 \000\000", 4)}, - {0x200001ull, string("\003 \000\001", 4)}, - {0x3fffffull, string("\003?\377\377", 4)}, - {0x400000ull, string("\003@\000\000", 4)}, - {0x400001ull, string("\003@\000\001", 4)}, - {0x7fffffull, string("\003\177\377\377", 4)}, - {0x800000ull, string("\003\200\000\000", 4)}, - {0x800001ull, string("\003\200\000\001", 4)}, - {0xffffffull, string("\003\377\377\377", 4)}, - {0x1000000ull, string("\004\001\000\000\000", 5)}, - {0x1000001ull, string("\004\001\000\000\001", 5)}, - {0x1ffffffull, string("\004\001\377\377\377", 5)}, - {0x2000000ull, string("\004\002\000\000\000", 5)}, - {0x2000001ull, string("\004\002\000\000\001", 5)}, - {0x3ffffffull, string("\004\003\377\377\377", 5)}, - {0x4000000ull, string("\004\004\000\000\000", 5)}, - {0x4000001ull, string("\004\004\000\000\001", 5)}, - {0x7ffffffull, string("\004\007\377\377\377", 5)}, - {0x8000000ull, string("\004\010\000\000\000", 5)}, - {0x8000001ull, string("\004\010\000\000\001", 5)}, - {0xfffffffull, string("\004\017\377\377\377", 5)}, - {0x10000000ull, string("\004\020\000\000\000", 5)}, - {0x10000001ull, string("\004\020\000\000\001", 5)}, - {0x1fffffffull, string("\004\037\377\377\377", 5)}, - {0x20000000ull, string("\004 \000\000\000", 5)}, - {0x20000001ull, string("\004 \000\000\001", 5)}, - {0x3fffffffull, string("\004?\377\377\377", 5)}, - {0x40000000ull, string("\004@\000\000\000", 5)}, - {0x40000001ull, string("\004@\000\000\001", 5)}, - {0x7fffffffull, string("\004\177\377\377\377", 5)}, - {0x80000000ull, string("\004\200\000\000\000", 5)}, - {0x80000001ull, string("\004\200\000\000\001", 5)}, - {0xffffffffull, string("\004\377\377\377\377", 5)}, - {0x100000000ull, string("\005\001\000\000\000\000", 6)}, - {0x100000001ull, string("\005\001\000\000\000\001", 6)}, - {0x1ffffffffull, string("\005\001\377\377\377\377", 6)}, - {0x200000000ull, string("\005\002\000\000\000\000", 6)}, - {0x200000001ull, string("\005\002\000\000\000\001", 6)}, - {0x3ffffffffull, string("\005\003\377\377\377\377", 6)}, - {0x400000000ull, string("\005\004\000\000\000\000", 6)}, - {0x400000001ull, string("\005\004\000\000\000\001", 6)}, - {0x7ffffffffull, string("\005\007\377\377\377\377", 6)}, - {0x800000000ull, string("\005\010\000\000\000\000", 6)}, - {0x800000001ull, string("\005\010\000\000\000\001", 6)}, - {0xfffffffffull, string("\005\017\377\377\377\377", 6)}, - {0x1000000000ull, string("\005\020\000\000\000\000", 6)}, - {0x1000000001ull, string("\005\020\000\000\000\001", 6)}, - {0x1fffffffffull, string("\005\037\377\377\377\377", 6)}, - {0x2000000000ull, string("\005 \000\000\000\000", 6)}, - {0x2000000001ull, string("\005 \000\000\000\001", 6)}, - {0x3fffffffffull, string("\005?\377\377\377\377", 6)}, - {0x4000000000ull, string("\005@\000\000\000\000", 6)}, - {0x4000000001ull, string("\005@\000\000\000\001", 6)}, - {0x7fffffffffull, string("\005\177\377\377\377\377", 6)}, - {0x8000000000ull, string("\005\200\000\000\000\000", 6)}, - {0x8000000001ull, string("\005\200\000\000\000\001", 6)}, - {0xffffffffffull, string("\005\377\377\377\377\377", 6)}, - {0x10000000000ull, string("\006\001\000\000\000\000\000", 7)}, - {0x10000000001ull, string("\006\001\000\000\000\000\001", 7)}, - {0x1ffffffffffull, string("\006\001\377\377\377\377\377", 7)}, - {0x20000000000ull, string("\006\002\000\000\000\000\000", 7)}, - {0x20000000001ull, string("\006\002\000\000\000\000\001", 7)}, - {0x3ffffffffffull, string("\006\003\377\377\377\377\377", 7)}, - {0x40000000000ull, string("\006\004\000\000\000\000\000", 7)}, - {0x40000000001ull, string("\006\004\000\000\000\000\001", 7)}, - {0x7ffffffffffull, string("\006\007\377\377\377\377\377", 7)}, - {0x80000000000ull, string("\006\010\000\000\000\000\000", 7)}, - {0x80000000001ull, string("\006\010\000\000\000\000\001", 7)}, - {0xfffffffffffull, string("\006\017\377\377\377\377\377", 7)}, - {0x100000000000ull, string("\006\020\000\000\000\000\000", 7)}, - {0x100000000001ull, string("\006\020\000\000\000\000\001", 7)}, - {0x1fffffffffffull, string("\006\037\377\377\377\377\377", 7)}, - {0x200000000000ull, string("\006 \000\000\000\000\000", 7)}, - {0x200000000001ull, string("\006 \000\000\000\000\001", 7)}, - {0x3fffffffffffull, string("\006?\377\377\377\377\377", 7)}, - {0x400000000000ull, string("\006@\000\000\000\000\000", 7)}, - {0x400000000001ull, string("\006@\000\000\000\000\001", 7)}, - {0x7fffffffffffull, string("\006\177\377\377\377\377\377", 7)}, - {0x800000000000ull, string("\006\200\000\000\000\000\000", 7)}, - {0x800000000001ull, string("\006\200\000\000\000\000\001", 7)}, - {0xffffffffffffull, string("\006\377\377\377\377\377\377", 7)}, - {0x1000000000000ull, string("\007\001\000\000\000\000\000\000", 8)}, - {0x1000000000001ull, string("\007\001\000\000\000\000\000\001", 8)}, - {0x1ffffffffffffull, string("\007\001\377\377\377\377\377\377", 8)}, - {0x2000000000000ull, string("\007\002\000\000\000\000\000\000", 8)}, - {0x2000000000001ull, string("\007\002\000\000\000\000\000\001", 8)}, - {0x3ffffffffffffull, string("\007\003\377\377\377\377\377\377", 8)}, - {0x4000000000000ull, string("\007\004\000\000\000\000\000\000", 8)}, - {0x4000000000001ull, string("\007\004\000\000\000\000\000\001", 8)}, - {0x7ffffffffffffull, string("\007\007\377\377\377\377\377\377", 8)}, - {0x8000000000000ull, string("\007\010\000\000\000\000\000\000", 8)}, - {0x8000000000001ull, string("\007\010\000\000\000\000\000\001", 8)}, - {0xfffffffffffffull, string("\007\017\377\377\377\377\377\377", 8)}, - {0x10000000000000ull, string("\007\020\000\000\000\000\000\000", 8)}, - {0x10000000000001ull, string("\007\020\000\000\000\000\000\001", 8)}, - {0x1fffffffffffffull, string("\007\037\377\377\377\377\377\377", 8)}, - {0x20000000000000ull, string("\007 \000\000\000\000\000\000", 8)}, - {0x20000000000001ull, string("\007 \000\000\000\000\000\001", 8)}, - {0x3fffffffffffffull, string("\007?\377\377\377\377\377\377", 8)}, - {0x40000000000000ull, string("\007@\000\000\000\000\000\000", 8)}, - {0x40000000000001ull, string("\007@\000\000\000\000\000\001", 8)}, - {0x7fffffffffffffull, string("\007\177\377\377\377\377\377\377", 8)}, - {0x80000000000000ull, string("\007\200\000\000\000\000\000\000", 8)}, - {0x80000000000001ull, string("\007\200\000\000\000\000\000\001", 8)}, - {0xffffffffffffffull, string("\007\377\377\377\377\377\377\377", 8)}, - {0x100000000000000ull, string("\010\001\000\000\000\000\000\000\000", 9)}, - {0x100000000000001ull, string("\010\001\000\000\000\000\000\000\001", 9)}, - {0x1ffffffffffffffull, string("\010\001\377\377\377\377\377\377\377", 9)}, - {0x200000000000000ull, string("\010\002\000\000\000\000\000\000\000", 9)}, - {0x200000000000001ull, string("\010\002\000\000\000\000\000\000\001", 9)}, - {0x3ffffffffffffffull, string("\010\003\377\377\377\377\377\377\377", 9)}, - {0x400000000000000ull, string("\010\004\000\000\000\000\000\000\000", 9)}, - {0x400000000000001ull, string("\010\004\000\000\000\000\000\000\001", 9)}, - {0x7ffffffffffffffull, string("\010\007\377\377\377\377\377\377\377", 9)}, - {0x800000000000000ull, string("\010\010\000\000\000\000\000\000\000", 9)}, - {0x800000000000001ull, string("\010\010\000\000\000\000\000\000\001", 9)}, - {0xfffffffffffffffull, string("\010\017\377\377\377\377\377\377\377", 9)}, + {0x0ull, ByteSequence("\000")}, + {0x1ull, ByteSequence("\001\001")}, + {0x2ull, ByteSequence("\001\002")}, + {0x1ull, ByteSequence("\001\001")}, + {0x2ull, ByteSequence("\001\002")}, + {0x3ull, ByteSequence("\001\003")}, + {0x3ull, ByteSequence("\001\003")}, + {0x4ull, ByteSequence("\001\004")}, + {0x5ull, ByteSequence("\001\005")}, + {0x7ull, ByteSequence("\001\007")}, + {0x8ull, ByteSequence("\001\010")}, + {0x9ull, ByteSequence("\001\t")}, + {0xfull, ByteSequence("\001\017")}, + {0x10ull, ByteSequence("\001\020")}, + {0x11ull, ByteSequence("\001\021")}, + {0x1full, ByteSequence("\001\037")}, + {0x20ull, ByteSequence("\001 ")}, + {0x21ull, ByteSequence("\001!")}, + {0x3full, ByteSequence("\001?")}, + {0x40ull, ByteSequence("\001@")}, + {0x41ull, ByteSequence("\001A")}, + {0x7full, ByteSequence("\001\177")}, + {0x80ull, ByteSequence("\001\200")}, + {0x81ull, ByteSequence("\001\201")}, + {0xffull, ByteSequence("\001\377")}, + {0x100ull, ByteSequence("\002\001\000")}, + {0x101ull, ByteSequence("\002\001\001")}, + {0x1ffull, ByteSequence("\002\001\377")}, + {0x200ull, ByteSequence("\002\002\000")}, + {0x201ull, ByteSequence("\002\002\001")}, + {0x3ffull, ByteSequence("\002\003\377")}, + {0x400ull, ByteSequence("\002\004\000")}, + {0x401ull, ByteSequence("\002\004\001")}, + {0x7ffull, ByteSequence("\002\007\377")}, + {0x800ull, ByteSequence("\002\010\000")}, + {0x801ull, ByteSequence("\002\010\001")}, + {0xfffull, ByteSequence("\002\017\377")}, + {0x1000ull, ByteSequence("\002\020\000")}, + {0x1001ull, ByteSequence("\002\020\001")}, + {0x1fffull, ByteSequence("\002\037\377")}, + {0x2000ull, ByteSequence("\002 \000")}, + {0x2001ull, ByteSequence("\002 \001")}, + {0x3fffull, ByteSequence("\002?\377")}, + {0x4000ull, ByteSequence("\002@\000")}, + {0x4001ull, ByteSequence("\002@\001")}, + {0x7fffull, ByteSequence("\002\177\377")}, + {0x8000ull, ByteSequence("\002\200\000")}, + {0x8001ull, ByteSequence("\002\200\001")}, + {0xffffull, ByteSequence("\002\377\377")}, + {0x10000ull, ByteSequence("\003\001\000\000")}, + {0x10001ull, ByteSequence("\003\001\000\001")}, + {0x1ffffull, ByteSequence("\003\001\377\377")}, + {0x20000ull, ByteSequence("\003\002\000\000")}, + {0x20001ull, ByteSequence("\003\002\000\001")}, + {0x3ffffull, ByteSequence("\003\003\377\377")}, + {0x40000ull, ByteSequence("\003\004\000\000")}, + {0x40001ull, ByteSequence("\003\004\000\001")}, + {0x7ffffull, ByteSequence("\003\007\377\377")}, + {0x80000ull, ByteSequence("\003\010\000\000")}, + {0x80001ull, ByteSequence("\003\010\000\001")}, + {0xfffffull, ByteSequence("\003\017\377\377")}, + {0x100000ull, ByteSequence("\003\020\000\000")}, + {0x100001ull, ByteSequence("\003\020\000\001")}, + {0x1fffffull, ByteSequence("\003\037\377\377")}, + {0x200000ull, ByteSequence("\003 \000\000")}, + {0x200001ull, ByteSequence("\003 \000\001")}, + {0x3fffffull, ByteSequence("\003?\377\377")}, + {0x400000ull, ByteSequence("\003@\000\000")}, + {0x400001ull, ByteSequence("\003@\000\001")}, + {0x7fffffull, ByteSequence("\003\177\377\377")}, + {0x800000ull, ByteSequence("\003\200\000\000")}, + {0x800001ull, ByteSequence("\003\200\000\001")}, + {0xffffffull, ByteSequence("\003\377\377\377")}, + {0x1000000ull, ByteSequence("\004\001\000\000\000")}, + {0x1000001ull, ByteSequence("\004\001\000\000\001")}, + {0x1ffffffull, ByteSequence("\004\001\377\377\377")}, + {0x2000000ull, ByteSequence("\004\002\000\000\000")}, + {0x2000001ull, ByteSequence("\004\002\000\000\001")}, + {0x3ffffffull, ByteSequence("\004\003\377\377\377")}, + {0x4000000ull, ByteSequence("\004\004\000\000\000")}, + {0x4000001ull, ByteSequence("\004\004\000\000\001")}, + {0x7ffffffull, ByteSequence("\004\007\377\377\377")}, + {0x8000000ull, ByteSequence("\004\010\000\000\000")}, + {0x8000001ull, ByteSequence("\004\010\000\000\001")}, + {0xfffffffull, ByteSequence("\004\017\377\377\377")}, + {0x10000000ull, ByteSequence("\004\020\000\000\000")}, + {0x10000001ull, ByteSequence("\004\020\000\000\001")}, + {0x1fffffffull, ByteSequence("\004\037\377\377\377")}, + {0x20000000ull, ByteSequence("\004 \000\000\000")}, + {0x20000001ull, ByteSequence("\004 \000\000\001")}, + {0x3fffffffull, ByteSequence("\004?\377\377\377")}, + {0x40000000ull, ByteSequence("\004@\000\000\000")}, + {0x40000001ull, ByteSequence("\004@\000\000\001")}, + {0x7fffffffull, ByteSequence("\004\177\377\377\377")}, + {0x80000000ull, ByteSequence("\004\200\000\000\000")}, + {0x80000001ull, ByteSequence("\004\200\000\000\001")}, + {0xffffffffull, ByteSequence("\004\377\377\377\377")}, + {0x100000000ull, ByteSequence("\005\001\000\000\000\000")}, + {0x100000001ull, ByteSequence("\005\001\000\000\000\001")}, + {0x1ffffffffull, ByteSequence("\005\001\377\377\377\377")}, + {0x200000000ull, ByteSequence("\005\002\000\000\000\000")}, + {0x200000001ull, ByteSequence("\005\002\000\000\000\001")}, + {0x3ffffffffull, ByteSequence("\005\003\377\377\377\377")}, + {0x400000000ull, ByteSequence("\005\004\000\000\000\000")}, + {0x400000001ull, ByteSequence("\005\004\000\000\000\001")}, + {0x7ffffffffull, ByteSequence("\005\007\377\377\377\377")}, + {0x800000000ull, ByteSequence("\005\010\000\000\000\000")}, + {0x800000001ull, ByteSequence("\005\010\000\000\000\001")}, + {0xfffffffffull, ByteSequence("\005\017\377\377\377\377")}, + {0x1000000000ull, ByteSequence("\005\020\000\000\000\000")}, + {0x1000000001ull, ByteSequence("\005\020\000\000\000\001")}, + {0x1fffffffffull, ByteSequence("\005\037\377\377\377\377")}, + {0x2000000000ull, ByteSequence("\005 \000\000\000\000")}, + {0x2000000001ull, ByteSequence("\005 \000\000\000\001")}, + {0x3fffffffffull, ByteSequence("\005?\377\377\377\377")}, + {0x4000000000ull, ByteSequence("\005@\000\000\000\000")}, + {0x4000000001ull, ByteSequence("\005@\000\000\000\001")}, + {0x7fffffffffull, ByteSequence("\005\177\377\377\377\377")}, + {0x8000000000ull, ByteSequence("\005\200\000\000\000\000")}, + {0x8000000001ull, ByteSequence("\005\200\000\000\000\001")}, + {0xffffffffffull, ByteSequence("\005\377\377\377\377\377")}, + {0x10000000000ull, ByteSequence("\006\001\000\000\000\000\000")}, + {0x10000000001ull, ByteSequence("\006\001\000\000\000\000\001")}, + {0x1ffffffffffull, ByteSequence("\006\001\377\377\377\377\377")}, + {0x20000000000ull, ByteSequence("\006\002\000\000\000\000\000")}, + {0x20000000001ull, ByteSequence("\006\002\000\000\000\000\001")}, + {0x3ffffffffffull, ByteSequence("\006\003\377\377\377\377\377")}, + {0x40000000000ull, ByteSequence("\006\004\000\000\000\000\000")}, + {0x40000000001ull, ByteSequence("\006\004\000\000\000\000\001")}, + {0x7ffffffffffull, ByteSequence("\006\007\377\377\377\377\377")}, + {0x80000000000ull, ByteSequence("\006\010\000\000\000\000\000")}, + {0x80000000001ull, ByteSequence("\006\010\000\000\000\000\001")}, + {0xfffffffffffull, ByteSequence("\006\017\377\377\377\377\377")}, + {0x100000000000ull, ByteSequence("\006\020\000\000\000\000\000")}, + {0x100000000001ull, ByteSequence("\006\020\000\000\000\000\001")}, + {0x1fffffffffffull, ByteSequence("\006\037\377\377\377\377\377")}, + {0x200000000000ull, ByteSequence("\006 \000\000\000\000\000")}, + {0x200000000001ull, ByteSequence("\006 \000\000\000\000\001")}, + {0x3fffffffffffull, ByteSequence("\006?\377\377\377\377\377")}, + {0x400000000000ull, ByteSequence("\006@\000\000\000\000\000")}, + {0x400000000001ull, ByteSequence("\006@\000\000\000\000\001")}, + {0x7fffffffffffull, ByteSequence("\006\177\377\377\377\377\377")}, + {0x800000000000ull, ByteSequence("\006\200\000\000\000\000\000")}, + {0x800000000001ull, ByteSequence("\006\200\000\000\000\000\001")}, + {0xffffffffffffull, ByteSequence("\006\377\377\377\377\377\377")}, + {0x1000000000000ull, ByteSequence("\007\001\000\000\000\000\000\000")}, + {0x1000000000001ull, ByteSequence("\007\001\000\000\000\000\000\001")}, + {0x1ffffffffffffull, ByteSequence("\007\001\377\377\377\377\377\377")}, + {0x2000000000000ull, ByteSequence("\007\002\000\000\000\000\000\000")}, + {0x2000000000001ull, ByteSequence("\007\002\000\000\000\000\000\001")}, + {0x3ffffffffffffull, ByteSequence("\007\003\377\377\377\377\377\377")}, + {0x4000000000000ull, ByteSequence("\007\004\000\000\000\000\000\000")}, + {0x4000000000001ull, ByteSequence("\007\004\000\000\000\000\000\001")}, + {0x7ffffffffffffull, ByteSequence("\007\007\377\377\377\377\377\377")}, + {0x8000000000000ull, ByteSequence("\007\010\000\000\000\000\000\000")}, + {0x8000000000001ull, ByteSequence("\007\010\000\000\000\000\000\001")}, + {0xfffffffffffffull, ByteSequence("\007\017\377\377\377\377\377\377")}, + {0x10000000000000ull, ByteSequence("\007\020\000\000\000\000\000\000")}, + {0x10000000000001ull, ByteSequence("\007\020\000\000\000\000\000\001")}, + {0x1fffffffffffffull, ByteSequence("\007\037\377\377\377\377\377\377")}, + {0x20000000000000ull, ByteSequence("\007 \000\000\000\000\000\000")}, + {0x20000000000001ull, ByteSequence("\007 \000\000\000\000\000\001")}, + {0x3fffffffffffffull, ByteSequence("\007?\377\377\377\377\377\377")}, + {0x40000000000000ull, ByteSequence("\007@\000\000\000\000\000\000")}, + {0x40000000000001ull, ByteSequence("\007@\000\000\000\000\000\001")}, + {0x7fffffffffffffull, ByteSequence("\007\177\377\377\377\377\377\377")}, + {0x80000000000000ull, ByteSequence("\007\200\000\000\000\000\000\000")}, + {0x80000000000001ull, ByteSequence("\007\200\000\000\000\000\000\001")}, + {0xffffffffffffffull, ByteSequence("\007\377\377\377\377\377\377\377")}, + {0x100000000000000ull, + ByteSequence("\010\001\000\000\000\000\000\000\000")}, + {0x100000000000001ull, + ByteSequence("\010\001\000\000\000\000\000\000\001")}, + {0x1ffffffffffffffull, + ByteSequence("\010\001\377\377\377\377\377\377\377")}, + {0x200000000000000ull, + ByteSequence("\010\002\000\000\000\000\000\000\000")}, + {0x200000000000001ull, + ByteSequence("\010\002\000\000\000\000\000\000\001")}, + {0x3ffffffffffffffull, + ByteSequence("\010\003\377\377\377\377\377\377\377")}, + {0x400000000000000ull, + ByteSequence("\010\004\000\000\000\000\000\000\000")}, + {0x400000000000001ull, + ByteSequence("\010\004\000\000\000\000\000\000\001")}, + {0x7ffffffffffffffull, + ByteSequence("\010\007\377\377\377\377\377\377\377")}, + {0x800000000000000ull, + ByteSequence("\010\010\000\000\000\000\000\000\000")}, + {0x800000000000001ull, + ByteSequence("\010\010\000\000\000\000\000\000\001")}, + {0xfffffffffffffffull, + ByteSequence("\010\017\377\377\377\377\377\377\377")}, {0x1000000000000000ull, - string("\010\020\000\000\000\000\000\000\000", 9)}, + ByteSequence("\010\020\000\000\000\000\000\000\000")}, {0x1000000000000001ull, - string("\010\020\000\000\000\000\000\000\001", 9)}, + ByteSequence("\010\020\000\000\000\000\000\000\001")}, {0x1fffffffffffffffull, - string("\010\037\377\377\377\377\377\377\377", 9)}, - {0x2000000000000000ull, string("\010 \000\000\000\000\000\000\000", 9)}, - {0x2000000000000001ull, string("\010 \000\000\000\000\000\000\001", 9)}, - {0x3fffffffffffffffull, string("\010?\377\377\377\377\377\377\377", 9)}, - {0x4000000000000000ull, string("\010@\000\000\000\000\000\000\000", 9)}, - {0x4000000000000001ull, string("\010@\000\000\000\000\000\000\001", 9)}, + ByteSequence("\010\037\377\377\377\377\377\377\377")}, + {0x2000000000000000ull, + ByteSequence("\010 \000\000\000\000\000\000\000")}, + {0x2000000000000001ull, + ByteSequence("\010 \000\000\000\000\000\000\001")}, + {0x3fffffffffffffffull, + ByteSequence("\010?\377\377\377\377\377\377\377")}, + {0x4000000000000000ull, + ByteSequence("\010@\000\000\000\000\000\000\000")}, + {0x4000000000000001ull, + ByteSequence("\010@\000\000\000\000\000\000\001")}, {0x7fffffffffffffffull, - string("\010\177\377\377\377\377\377\377\377", 9)}, + ByteSequence("\010\177\377\377\377\377\377\377\377")}, {0x8000000000000000ull, - string("\010\200\000\000\000\000\000\000\000", 9)}, + ByteSequence("\010\200\000\000\000\000\000\000\000")}, {0x8000000000000001ull, - string("\010\200\000\000\000\000\000\000\001", 9)}, + ByteSequence("\010\200\000\000\000\000\000\000\001")}, }; for (const auto& t : data) { uint64 num = t.first; @@ -739,402 +764,436 @@ TEST(EncodingIsExpected, Unsigned) { TEST(EncodingIsExpected, Signed) { std::vector> data = { - {0ll, string("\200", 1)}, - {1ll, string("\201", 1)}, - {2ll, string("\202", 1)}, - {1ll, string("\201", 1)}, - {2ll, string("\202", 1)}, - {3ll, string("\203", 1)}, - {3ll, string("\203", 1)}, - {4ll, string("\204", 1)}, - {5ll, string("\205", 1)}, - {7ll, string("\207", 1)}, - {8ll, string("\210", 1)}, - {9ll, string("\211", 1)}, - {15ll, string("\217", 1)}, - {16ll, string("\220", 1)}, - {17ll, string("\221", 1)}, - {31ll, string("\237", 1)}, - {32ll, string("\240", 1)}, - {33ll, string("\241", 1)}, - {63ll, string("\277", 1)}, - {64ll, string("\300@", 2)}, - {65ll, string("\300A", 2)}, - {127ll, string("\300\177", 2)}, - {128ll, string("\300\200", 2)}, - {129ll, string("\300\201", 2)}, - {255ll, string("\300\377", 2)}, - {256ll, string("\301\000", 2)}, - {257ll, string("\301\001", 2)}, - {511ll, string("\301\377", 2)}, - {512ll, string("\302\000", 2)}, - {513ll, string("\302\001", 2)}, - {1023ll, string("\303\377", 2)}, - {1024ll, string("\304\000", 2)}, - {1025ll, string("\304\001", 2)}, - {2047ll, string("\307\377", 2)}, - {2048ll, string("\310\000", 2)}, - {2049ll, string("\310\001", 2)}, - {4095ll, string("\317\377", 2)}, - {4096ll, string("\320\000", 2)}, - {4097ll, string("\320\001", 2)}, - {8191ll, string("\337\377", 2)}, - {8192ll, string("\340 \000", 3)}, - {8193ll, string("\340 \001", 3)}, - {16383ll, string("\340?\377", 3)}, - {16384ll, string("\340@\000", 3)}, - {16385ll, string("\340@\001", 3)}, - {32767ll, string("\340\177\377", 3)}, - {32768ll, string("\340\200\000", 3)}, - {32769ll, string("\340\200\001", 3)}, - {65535ll, string("\340\377\377", 3)}, - {65536ll, string("\341\000\000", 3)}, - {65537ll, string("\341\000\001", 3)}, - {131071ll, string("\341\377\377", 3)}, - {131072ll, string("\342\000\000", 3)}, - {131073ll, string("\342\000\001", 3)}, - {262143ll, string("\343\377\377", 3)}, - {262144ll, string("\344\000\000", 3)}, - {262145ll, string("\344\000\001", 3)}, - {524287ll, string("\347\377\377", 3)}, - {524288ll, string("\350\000\000", 3)}, - {524289ll, string("\350\000\001", 3)}, - {1048575ll, string("\357\377\377", 3)}, - {1048576ll, string("\360\020\000\000", 4)}, - {1048577ll, string("\360\020\000\001", 4)}, - {2097151ll, string("\360\037\377\377", 4)}, - {2097152ll, string("\360 \000\000", 4)}, - {2097153ll, string("\360 \000\001", 4)}, - {4194303ll, string("\360?\377\377", 4)}, - {4194304ll, string("\360@\000\000", 4)}, - {4194305ll, string("\360@\000\001", 4)}, - {8388607ll, string("\360\177\377\377", 4)}, - {8388608ll, string("\360\200\000\000", 4)}, - {8388609ll, string("\360\200\000\001", 4)}, - {16777215ll, string("\360\377\377\377", 4)}, - {16777216ll, string("\361\000\000\000", 4)}, - {16777217ll, string("\361\000\000\001", 4)}, - {33554431ll, string("\361\377\377\377", 4)}, - {33554432ll, string("\362\000\000\000", 4)}, - {33554433ll, string("\362\000\000\001", 4)}, - {67108863ll, string("\363\377\377\377", 4)}, - {67108864ll, string("\364\000\000\000", 4)}, - {67108865ll, string("\364\000\000\001", 4)}, - {134217727ll, string("\367\377\377\377", 4)}, - {134217728ll, string("\370\010\000\000\000", 5)}, - {134217729ll, string("\370\010\000\000\001", 5)}, - {268435455ll, string("\370\017\377\377\377", 5)}, - {268435456ll, string("\370\020\000\000\000", 5)}, - {268435457ll, string("\370\020\000\000\001", 5)}, - {536870911ll, string("\370\037\377\377\377", 5)}, - {536870912ll, string("\370 \000\000\000", 5)}, - {536870913ll, string("\370 \000\000\001", 5)}, - {1073741823ll, string("\370?\377\377\377", 5)}, - {1073741824ll, string("\370@\000\000\000", 5)}, - {1073741825ll, string("\370@\000\000\001", 5)}, - {2147483647ll, string("\370\177\377\377\377", 5)}, - {2147483648ll, string("\370\200\000\000\000", 5)}, - {2147483649ll, string("\370\200\000\000\001", 5)}, - {4294967295ll, string("\370\377\377\377\377", 5)}, - {4294967296ll, string("\371\000\000\000\000", 5)}, - {4294967297ll, string("\371\000\000\000\001", 5)}, - {8589934591ll, string("\371\377\377\377\377", 5)}, - {8589934592ll, string("\372\000\000\000\000", 5)}, - {8589934593ll, string("\372\000\000\000\001", 5)}, - {17179869183ll, string("\373\377\377\377\377", 5)}, - {17179869184ll, string("\374\004\000\000\000\000", 6)}, - {17179869185ll, string("\374\004\000\000\000\001", 6)}, - {34359738367ll, string("\374\007\377\377\377\377", 6)}, - {34359738368ll, string("\374\010\000\000\000\000", 6)}, - {34359738369ll, string("\374\010\000\000\000\001", 6)}, - {68719476735ll, string("\374\017\377\377\377\377", 6)}, - {68719476736ll, string("\374\020\000\000\000\000", 6)}, - {68719476737ll, string("\374\020\000\000\000\001", 6)}, - {137438953471ll, string("\374\037\377\377\377\377", 6)}, - {137438953472ll, string("\374 \000\000\000\000", 6)}, - {137438953473ll, string("\374 \000\000\000\001", 6)}, - {274877906943ll, string("\374?\377\377\377\377", 6)}, - {274877906944ll, string("\374@\000\000\000\000", 6)}, - {274877906945ll, string("\374@\000\000\000\001", 6)}, - {549755813887ll, string("\374\177\377\377\377\377", 6)}, - {549755813888ll, string("\374\200\000\000\000\000", 6)}, - {549755813889ll, string("\374\200\000\000\000\001", 6)}, - {1099511627775ll, string("\374\377\377\377\377\377", 6)}, - {1099511627776ll, string("\375\000\000\000\000\000", 6)}, - {1099511627777ll, string("\375\000\000\000\000\001", 6)}, - {2199023255551ll, string("\375\377\377\377\377\377", 6)}, - {2199023255552ll, string("\376\002\000\000\000\000\000", 7)}, - {2199023255553ll, string("\376\002\000\000\000\000\001", 7)}, - {4398046511103ll, string("\376\003\377\377\377\377\377", 7)}, - {4398046511104ll, string("\376\004\000\000\000\000\000", 7)}, - {4398046511105ll, string("\376\004\000\000\000\000\001", 7)}, - {8796093022207ll, string("\376\007\377\377\377\377\377", 7)}, - {8796093022208ll, string("\376\010\000\000\000\000\000", 7)}, - {8796093022209ll, string("\376\010\000\000\000\000\001", 7)}, - {17592186044415ll, string("\376\017\377\377\377\377\377", 7)}, - {17592186044416ll, string("\376\020\000\000\000\000\000", 7)}, - {17592186044417ll, string("\376\020\000\000\000\000\001", 7)}, - {35184372088831ll, string("\376\037\377\377\377\377\377", 7)}, - {35184372088832ll, string("\376 \000\000\000\000\000", 7)}, - {35184372088833ll, string("\376 \000\000\000\000\001", 7)}, - {70368744177663ll, string("\376?\377\377\377\377\377", 7)}, - {70368744177664ll, string("\376@\000\000\000\000\000", 7)}, - {70368744177665ll, string("\376@\000\000\000\000\001", 7)}, - {140737488355327ll, string("\376\177\377\377\377\377\377", 7)}, - {140737488355328ll, string("\376\200\000\000\000\000\000", 7)}, - {140737488355329ll, string("\376\200\000\000\000\000\001", 7)}, - {281474976710655ll, string("\376\377\377\377\377\377\377", 7)}, - {281474976710656ll, string("\377\001\000\000\000\000\000\000", 8)}, - {281474976710657ll, string("\377\001\000\000\000\000\000\001", 8)}, - {562949953421311ll, string("\377\001\377\377\377\377\377\377", 8)}, - {562949953421312ll, string("\377\002\000\000\000\000\000\000", 8)}, - {562949953421313ll, string("\377\002\000\000\000\000\000\001", 8)}, - {1125899906842623ll, string("\377\003\377\377\377\377\377\377", 8)}, - {1125899906842624ll, string("\377\004\000\000\000\000\000\000", 8)}, - {1125899906842625ll, string("\377\004\000\000\000\000\000\001", 8)}, - {2251799813685247ll, string("\377\007\377\377\377\377\377\377", 8)}, - {2251799813685248ll, string("\377\010\000\000\000\000\000\000", 8)}, - {2251799813685249ll, string("\377\010\000\000\000\000\000\001", 8)}, - {4503599627370495ll, string("\377\017\377\377\377\377\377\377", 8)}, - {4503599627370496ll, string("\377\020\000\000\000\000\000\000", 8)}, - {4503599627370497ll, string("\377\020\000\000\000\000\000\001", 8)}, - {9007199254740991ll, string("\377\037\377\377\377\377\377\377", 8)}, - {9007199254740992ll, string("\377 \000\000\000\000\000\000", 8)}, - {9007199254740993ll, string("\377 \000\000\000\000\000\001", 8)}, - {18014398509481983ll, string("\377?\377\377\377\377\377\377", 8)}, - {18014398509481984ll, string("\377@\000\000\000\000\000\000", 8)}, - {18014398509481985ll, string("\377@\000\000\000\000\000\001", 8)}, - {36028797018963967ll, string("\377\177\377\377\377\377\377\377", 8)}, - {36028797018963968ll, string("\377\200\200\000\000\000\000\000\000", 9)}, - {36028797018963969ll, string("\377\200\200\000\000\000\000\000\001", 9)}, - {72057594037927935ll, string("\377\200\377\377\377\377\377\377\377", 9)}, - {72057594037927936ll, string("\377\201\000\000\000\000\000\000\000", 9)}, - {72057594037927937ll, string("\377\201\000\000\000\000\000\000\001", 9)}, - {144115188075855871ll, string("\377\201\377\377\377\377\377\377\377", 9)}, - {144115188075855872ll, string("\377\202\000\000\000\000\000\000\000", 9)}, - {144115188075855873ll, string("\377\202\000\000\000\000\000\000\001", 9)}, - {288230376151711743ll, string("\377\203\377\377\377\377\377\377\377", 9)}, - {288230376151711744ll, string("\377\204\000\000\000\000\000\000\000", 9)}, - {288230376151711745ll, string("\377\204\000\000\000\000\000\000\001", 9)}, - {576460752303423487ll, string("\377\207\377\377\377\377\377\377\377", 9)}, - {576460752303423488ll, string("\377\210\000\000\000\000\000\000\000", 9)}, - {576460752303423489ll, string("\377\210\000\000\000\000\000\000\001", 9)}, + {0ll, ByteSequence("\200")}, + {1ll, ByteSequence("\201")}, + {2ll, ByteSequence("\202")}, + {1ll, ByteSequence("\201")}, + {2ll, ByteSequence("\202")}, + {3ll, ByteSequence("\203")}, + {3ll, ByteSequence("\203")}, + {4ll, ByteSequence("\204")}, + {5ll, ByteSequence("\205")}, + {7ll, ByteSequence("\207")}, + {8ll, ByteSequence("\210")}, + {9ll, ByteSequence("\211")}, + {15ll, ByteSequence("\217")}, + {16ll, ByteSequence("\220")}, + {17ll, ByteSequence("\221")}, + {31ll, ByteSequence("\237")}, + {32ll, ByteSequence("\240")}, + {33ll, ByteSequence("\241")}, + {63ll, ByteSequence("\277")}, + {64ll, ByteSequence("\300@")}, + {65ll, ByteSequence("\300A")}, + {127ll, ByteSequence("\300\177")}, + {128ll, ByteSequence("\300\200")}, + {129ll, ByteSequence("\300\201")}, + {255ll, ByteSequence("\300\377")}, + {256ll, ByteSequence("\301\000")}, + {257ll, ByteSequence("\301\001")}, + {511ll, ByteSequence("\301\377")}, + {512ll, ByteSequence("\302\000")}, + {513ll, ByteSequence("\302\001")}, + {1023ll, ByteSequence("\303\377")}, + {1024ll, ByteSequence("\304\000")}, + {1025ll, ByteSequence("\304\001")}, + {2047ll, ByteSequence("\307\377")}, + {2048ll, ByteSequence("\310\000")}, + {2049ll, ByteSequence("\310\001")}, + {4095ll, ByteSequence("\317\377")}, + {4096ll, ByteSequence("\320\000")}, + {4097ll, ByteSequence("\320\001")}, + {8191ll, ByteSequence("\337\377")}, + {8192ll, ByteSequence("\340 \000")}, + {8193ll, ByteSequence("\340 \001")}, + {16383ll, ByteSequence("\340?\377")}, + {16384ll, ByteSequence("\340@\000")}, + {16385ll, ByteSequence("\340@\001")}, + {32767ll, ByteSequence("\340\177\377")}, + {32768ll, ByteSequence("\340\200\000")}, + {32769ll, ByteSequence("\340\200\001")}, + {65535ll, ByteSequence("\340\377\377")}, + {65536ll, ByteSequence("\341\000\000")}, + {65537ll, ByteSequence("\341\000\001")}, + {131071ll, ByteSequence("\341\377\377")}, + {131072ll, ByteSequence("\342\000\000")}, + {131073ll, ByteSequence("\342\000\001")}, + {262143ll, ByteSequence("\343\377\377")}, + {262144ll, ByteSequence("\344\000\000")}, + {262145ll, ByteSequence("\344\000\001")}, + {524287ll, ByteSequence("\347\377\377")}, + {524288ll, ByteSequence("\350\000\000")}, + {524289ll, ByteSequence("\350\000\001")}, + {1048575ll, ByteSequence("\357\377\377")}, + {1048576ll, ByteSequence("\360\020\000\000")}, + {1048577ll, ByteSequence("\360\020\000\001")}, + {2097151ll, ByteSequence("\360\037\377\377")}, + {2097152ll, ByteSequence("\360 \000\000")}, + {2097153ll, ByteSequence("\360 \000\001")}, + {4194303ll, ByteSequence("\360?\377\377")}, + {4194304ll, ByteSequence("\360@\000\000")}, + {4194305ll, ByteSequence("\360@\000\001")}, + {8388607ll, ByteSequence("\360\177\377\377")}, + {8388608ll, ByteSequence("\360\200\000\000")}, + {8388609ll, ByteSequence("\360\200\000\001")}, + {16777215ll, ByteSequence("\360\377\377\377")}, + {16777216ll, ByteSequence("\361\000\000\000")}, + {16777217ll, ByteSequence("\361\000\000\001")}, + {33554431ll, ByteSequence("\361\377\377\377")}, + {33554432ll, ByteSequence("\362\000\000\000")}, + {33554433ll, ByteSequence("\362\000\000\001")}, + {67108863ll, ByteSequence("\363\377\377\377")}, + {67108864ll, ByteSequence("\364\000\000\000")}, + {67108865ll, ByteSequence("\364\000\000\001")}, + {134217727ll, ByteSequence("\367\377\377\377")}, + {134217728ll, ByteSequence("\370\010\000\000\000")}, + {134217729ll, ByteSequence("\370\010\000\000\001")}, + {268435455ll, ByteSequence("\370\017\377\377\377")}, + {268435456ll, ByteSequence("\370\020\000\000\000")}, + {268435457ll, ByteSequence("\370\020\000\000\001")}, + {536870911ll, ByteSequence("\370\037\377\377\377")}, + {536870912ll, ByteSequence("\370 \000\000\000")}, + {536870913ll, ByteSequence("\370 \000\000\001")}, + {1073741823ll, ByteSequence("\370?\377\377\377")}, + {1073741824ll, ByteSequence("\370@\000\000\000")}, + {1073741825ll, ByteSequence("\370@\000\000\001")}, + {2147483647ll, ByteSequence("\370\177\377\377\377")}, + {2147483648ll, ByteSequence("\370\200\000\000\000")}, + {2147483649ll, ByteSequence("\370\200\000\000\001")}, + {4294967295ll, ByteSequence("\370\377\377\377\377")}, + {4294967296ll, ByteSequence("\371\000\000\000\000")}, + {4294967297ll, ByteSequence("\371\000\000\000\001")}, + {8589934591ll, ByteSequence("\371\377\377\377\377")}, + {8589934592ll, ByteSequence("\372\000\000\000\000")}, + {8589934593ll, ByteSequence("\372\000\000\000\001")}, + {17179869183ll, ByteSequence("\373\377\377\377\377")}, + {17179869184ll, ByteSequence("\374\004\000\000\000\000")}, + {17179869185ll, ByteSequence("\374\004\000\000\000\001")}, + {34359738367ll, ByteSequence("\374\007\377\377\377\377")}, + {34359738368ll, ByteSequence("\374\010\000\000\000\000")}, + {34359738369ll, ByteSequence("\374\010\000\000\000\001")}, + {68719476735ll, ByteSequence("\374\017\377\377\377\377")}, + {68719476736ll, ByteSequence("\374\020\000\000\000\000")}, + {68719476737ll, ByteSequence("\374\020\000\000\000\001")}, + {137438953471ll, ByteSequence("\374\037\377\377\377\377")}, + {137438953472ll, ByteSequence("\374 \000\000\000\000")}, + {137438953473ll, ByteSequence("\374 \000\000\000\001")}, + {274877906943ll, ByteSequence("\374?\377\377\377\377")}, + {274877906944ll, ByteSequence("\374@\000\000\000\000")}, + {274877906945ll, ByteSequence("\374@\000\000\000\001")}, + {549755813887ll, ByteSequence("\374\177\377\377\377\377")}, + {549755813888ll, ByteSequence("\374\200\000\000\000\000")}, + {549755813889ll, ByteSequence("\374\200\000\000\000\001")}, + {1099511627775ll, ByteSequence("\374\377\377\377\377\377")}, + {1099511627776ll, ByteSequence("\375\000\000\000\000\000")}, + {1099511627777ll, ByteSequence("\375\000\000\000\000\001")}, + {2199023255551ll, ByteSequence("\375\377\377\377\377\377")}, + {2199023255552ll, ByteSequence("\376\002\000\000\000\000\000")}, + {2199023255553ll, ByteSequence("\376\002\000\000\000\000\001")}, + {4398046511103ll, ByteSequence("\376\003\377\377\377\377\377")}, + {4398046511104ll, ByteSequence("\376\004\000\000\000\000\000")}, + {4398046511105ll, ByteSequence("\376\004\000\000\000\000\001")}, + {8796093022207ll, ByteSequence("\376\007\377\377\377\377\377")}, + {8796093022208ll, ByteSequence("\376\010\000\000\000\000\000")}, + {8796093022209ll, ByteSequence("\376\010\000\000\000\000\001")}, + {17592186044415ll, ByteSequence("\376\017\377\377\377\377\377")}, + {17592186044416ll, ByteSequence("\376\020\000\000\000\000\000")}, + {17592186044417ll, ByteSequence("\376\020\000\000\000\000\001")}, + {35184372088831ll, ByteSequence("\376\037\377\377\377\377\377")}, + {35184372088832ll, ByteSequence("\376 \000\000\000\000\000")}, + {35184372088833ll, ByteSequence("\376 \000\000\000\000\001")}, + {70368744177663ll, ByteSequence("\376?\377\377\377\377\377")}, + {70368744177664ll, ByteSequence("\376@\000\000\000\000\000")}, + {70368744177665ll, ByteSequence("\376@\000\000\000\000\001")}, + {140737488355327ll, ByteSequence("\376\177\377\377\377\377\377")}, + {140737488355328ll, ByteSequence("\376\200\000\000\000\000\000")}, + {140737488355329ll, ByteSequence("\376\200\000\000\000\000\001")}, + {281474976710655ll, ByteSequence("\376\377\377\377\377\377\377")}, + {281474976710656ll, ByteSequence("\377\001\000\000\000\000\000\000")}, + {281474976710657ll, ByteSequence("\377\001\000\000\000\000\000\001")}, + {562949953421311ll, ByteSequence("\377\001\377\377\377\377\377\377")}, + {562949953421312ll, ByteSequence("\377\002\000\000\000\000\000\000")}, + {562949953421313ll, ByteSequence("\377\002\000\000\000\000\000\001")}, + {1125899906842623ll, ByteSequence("\377\003\377\377\377\377\377\377")}, + {1125899906842624ll, ByteSequence("\377\004\000\000\000\000\000\000")}, + {1125899906842625ll, ByteSequence("\377\004\000\000\000\000\000\001")}, + {2251799813685247ll, ByteSequence("\377\007\377\377\377\377\377\377")}, + {2251799813685248ll, ByteSequence("\377\010\000\000\000\000\000\000")}, + {2251799813685249ll, ByteSequence("\377\010\000\000\000\000\000\001")}, + {4503599627370495ll, ByteSequence("\377\017\377\377\377\377\377\377")}, + {4503599627370496ll, ByteSequence("\377\020\000\000\000\000\000\000")}, + {4503599627370497ll, ByteSequence("\377\020\000\000\000\000\000\001")}, + {9007199254740991ll, ByteSequence("\377\037\377\377\377\377\377\377")}, + {9007199254740992ll, ByteSequence("\377 \000\000\000\000\000\000")}, + {9007199254740993ll, ByteSequence("\377 \000\000\000\000\000\001")}, + {18014398509481983ll, ByteSequence("\377?\377\377\377\377\377\377")}, + {18014398509481984ll, ByteSequence("\377@\000\000\000\000\000\000")}, + {18014398509481985ll, ByteSequence("\377@\000\000\000\000\000\001")}, + {36028797018963967ll, ByteSequence("\377\177\377\377\377\377\377\377")}, + {36028797018963968ll, + ByteSequence("\377\200\200\000\000\000\000\000\000")}, + {36028797018963969ll, + ByteSequence("\377\200\200\000\000\000\000\000\001")}, + {72057594037927935ll, + ByteSequence("\377\200\377\377\377\377\377\377\377")}, + {72057594037927936ll, + ByteSequence("\377\201\000\000\000\000\000\000\000")}, + {72057594037927937ll, + ByteSequence("\377\201\000\000\000\000\000\000\001")}, + {144115188075855871ll, + ByteSequence("\377\201\377\377\377\377\377\377\377")}, + {144115188075855872ll, + ByteSequence("\377\202\000\000\000\000\000\000\000")}, + {144115188075855873ll, + ByteSequence("\377\202\000\000\000\000\000\000\001")}, + {288230376151711743ll, + ByteSequence("\377\203\377\377\377\377\377\377\377")}, + {288230376151711744ll, + ByteSequence("\377\204\000\000\000\000\000\000\000")}, + {288230376151711745ll, + ByteSequence("\377\204\000\000\000\000\000\000\001")}, + {576460752303423487ll, + ByteSequence("\377\207\377\377\377\377\377\377\377")}, + {576460752303423488ll, + ByteSequence("\377\210\000\000\000\000\000\000\000")}, + {576460752303423489ll, + ByteSequence("\377\210\000\000\000\000\000\000\001")}, {1152921504606846975ll, - string("\377\217\377\377\377\377\377\377\377", 9)}, + ByteSequence("\377\217\377\377\377\377\377\377\377")}, {1152921504606846976ll, - string("\377\220\000\000\000\000\000\000\000", 9)}, + ByteSequence("\377\220\000\000\000\000\000\000\000")}, {1152921504606846977ll, - string("\377\220\000\000\000\000\000\000\001", 9)}, + ByteSequence("\377\220\000\000\000\000\000\000\001")}, {2305843009213693951ll, - string("\377\237\377\377\377\377\377\377\377", 9)}, + ByteSequence("\377\237\377\377\377\377\377\377\377")}, {2305843009213693952ll, - string("\377\240\000\000\000\000\000\000\000", 9)}, + ByteSequence("\377\240\000\000\000\000\000\000\000")}, {2305843009213693953ll, - string("\377\240\000\000\000\000\000\000\001", 9)}, + ByteSequence("\377\240\000\000\000\000\000\000\001")}, {4611686018427387903ll, - string("\377\277\377\377\377\377\377\377\377", 9)}, + ByteSequence("\377\277\377\377\377\377\377\377\377")}, {4611686018427387904ll, - string("\377\300@\000\000\000\000\000\000\000", 10)}, + ByteSequence("\377\300@\000\000\000\000\000\000\000")}, {4611686018427387905ll, - string("\377\300@\000\000\000\000\000\000\001", 10)}, + ByteSequence("\377\300@\000\000\000\000\000\000\001")}, {9223372036854775807ll, - string("\377\300\177\377\377\377\377\377\377\377", 10)}, + ByteSequence("\377\300\177\377\377\377\377\377\377\377")}, {-9223372036854775807ll, - string("\000?\200\000\000\000\000\000\000\001", 10)}, - {0ll, string("\200", 1)}, - {-1ll, string("\177", 1)}, - {-2ll, string("~", 1)}, - {-1ll, string("\177", 1)}, - {-2ll, string("~", 1)}, - {-3ll, string("}", 1)}, - {-3ll, string("}", 1)}, - {-4ll, string("|", 1)}, - {-5ll, string("{", 1)}, - {-7ll, string("y", 1)}, - {-8ll, string("x", 1)}, - {-9ll, string("w", 1)}, - {-15ll, string("q", 1)}, - {-16ll, string("p", 1)}, - {-17ll, string("o", 1)}, - {-31ll, string("a", 1)}, - {-32ll, string("`", 1)}, - {-33ll, string("_", 1)}, - {-63ll, string("A", 1)}, - {-64ll, string("@", 1)}, - {-65ll, string("?\277", 2)}, - {-127ll, string("?\201", 2)}, - {-128ll, string("?\200", 2)}, - {-129ll, string("?\177", 2)}, - {-255ll, string("?\001", 2)}, - {-256ll, string("?\000", 2)}, - {-257ll, string(">\377", 2)}, - {-511ll, string(">\001", 2)}, - {-512ll, string(">\000", 2)}, - {-513ll, string("=\377", 2)}, - {-1023ll, string("<\001", 2)}, - {-1024ll, string("<\000", 2)}, - {-1025ll, string(";\377", 2)}, - {-2047ll, string("8\001", 2)}, - {-2048ll, string("8\000", 2)}, - {-2049ll, string("7\377", 2)}, - {-4095ll, string("0\001", 2)}, - {-4096ll, string("0\000", 2)}, - {-4097ll, string("/\377", 2)}, - {-8191ll, string(" \001", 2)}, - {-8192ll, string(" \000", 2)}, - {-8193ll, string("\037\337\377", 3)}, - {-16383ll, string("\037\300\001", 3)}, - {-16384ll, string("\037\300\000", 3)}, - {-16385ll, string("\037\277\377", 3)}, - {-32767ll, string("\037\200\001", 3)}, - {-32768ll, string("\037\200\000", 3)}, - {-32769ll, string("\037\177\377", 3)}, - {-65535ll, string("\037\000\001", 3)}, - {-65536ll, string("\037\000\000", 3)}, - {-65537ll, string("\036\377\377", 3)}, - {-131071ll, string("\036\000\001", 3)}, - {-131072ll, string("\036\000\000", 3)}, - {-131073ll, string("\035\377\377", 3)}, - {-262143ll, string("\034\000\001", 3)}, - {-262144ll, string("\034\000\000", 3)}, - {-262145ll, string("\033\377\377", 3)}, - {-524287ll, string("\030\000\001", 3)}, - {-524288ll, string("\030\000\000", 3)}, - {-524289ll, string("\027\377\377", 3)}, - {-1048575ll, string("\020\000\001", 3)}, - {-1048576ll, string("\020\000\000", 3)}, - {-1048577ll, string("\017\357\377\377", 4)}, - {-2097151ll, string("\017\340\000\001", 4)}, - {-2097152ll, string("\017\340\000\000", 4)}, - {-2097153ll, string("\017\337\377\377", 4)}, - {-4194303ll, string("\017\300\000\001", 4)}, - {-4194304ll, string("\017\300\000\000", 4)}, - {-4194305ll, string("\017\277\377\377", 4)}, - {-8388607ll, string("\017\200\000\001", 4)}, - {-8388608ll, string("\017\200\000\000", 4)}, - {-8388609ll, string("\017\177\377\377", 4)}, - {-16777215ll, string("\017\000\000\001", 4)}, - {-16777216ll, string("\017\000\000\000", 4)}, - {-16777217ll, string("\016\377\377\377", 4)}, - {-33554431ll, string("\016\000\000\001", 4)}, - {-33554432ll, string("\016\000\000\000", 4)}, - {-33554433ll, string("\r\377\377\377", 4)}, - {-67108863ll, string("\014\000\000\001", 4)}, - {-67108864ll, string("\014\000\000\000", 4)}, - {-67108865ll, string("\013\377\377\377", 4)}, - {-134217727ll, string("\010\000\000\001", 4)}, - {-134217728ll, string("\010\000\000\000", 4)}, - {-134217729ll, string("\007\367\377\377\377", 5)}, - {-268435455ll, string("\007\360\000\000\001", 5)}, - {-268435456ll, string("\007\360\000\000\000", 5)}, - {-268435457ll, string("\007\357\377\377\377", 5)}, - {-536870911ll, string("\007\340\000\000\001", 5)}, - {-536870912ll, string("\007\340\000\000\000", 5)}, - {-536870913ll, string("\007\337\377\377\377", 5)}, - {-1073741823ll, string("\007\300\000\000\001", 5)}, - {-1073741824ll, string("\007\300\000\000\000", 5)}, - {-1073741825ll, string("\007\277\377\377\377", 5)}, - {-2147483647ll, string("\007\200\000\000\001", 5)}, - {-2147483648ll, string("\007\200\000\000\000", 5)}, - {-2147483649ll, string("\007\177\377\377\377", 5)}, - {-4294967295ll, string("\007\000\000\000\001", 5)}, - {-4294967296ll, string("\007\000\000\000\000", 5)}, - {-4294967297ll, string("\006\377\377\377\377", 5)}, - {-8589934591ll, string("\006\000\000\000\001", 5)}, - {-8589934592ll, string("\006\000\000\000\000", 5)}, - {-8589934593ll, string("\005\377\377\377\377", 5)}, - {-17179869183ll, string("\004\000\000\000\001", 5)}, - {-17179869184ll, string("\004\000\000\000\000", 5)}, - {-17179869185ll, string("\003\373\377\377\377\377", 6)}, - {-34359738367ll, string("\003\370\000\000\000\001", 6)}, - {-34359738368ll, string("\003\370\000\000\000\000", 6)}, - {-34359738369ll, string("\003\367\377\377\377\377", 6)}, - {-68719476735ll, string("\003\360\000\000\000\001", 6)}, - {-68719476736ll, string("\003\360\000\000\000\000", 6)}, - {-68719476737ll, string("\003\357\377\377\377\377", 6)}, - {-137438953471ll, string("\003\340\000\000\000\001", 6)}, - {-137438953472ll, string("\003\340\000\000\000\000", 6)}, - {-137438953473ll, string("\003\337\377\377\377\377", 6)}, - {-274877906943ll, string("\003\300\000\000\000\001", 6)}, - {-274877906944ll, string("\003\300\000\000\000\000", 6)}, - {-274877906945ll, string("\003\277\377\377\377\377", 6)}, - {-549755813887ll, string("\003\200\000\000\000\001", 6)}, - {-549755813888ll, string("\003\200\000\000\000\000", 6)}, - {-549755813889ll, string("\003\177\377\377\377\377", 6)}, - {-1099511627775ll, string("\003\000\000\000\000\001", 6)}, - {-1099511627776ll, string("\003\000\000\000\000\000", 6)}, - {-1099511627777ll, string("\002\377\377\377\377\377", 6)}, - {-2199023255551ll, string("\002\000\000\000\000\001", 6)}, - {-2199023255552ll, string("\002\000\000\000\000\000", 6)}, - {-2199023255553ll, string("\001\375\377\377\377\377\377", 7)}, - {-4398046511103ll, string("\001\374\000\000\000\000\001", 7)}, - {-4398046511104ll, string("\001\374\000\000\000\000\000", 7)}, - {-4398046511105ll, string("\001\373\377\377\377\377\377", 7)}, - {-8796093022207ll, string("\001\370\000\000\000\000\001", 7)}, - {-8796093022208ll, string("\001\370\000\000\000\000\000", 7)}, - {-8796093022209ll, string("\001\367\377\377\377\377\377", 7)}, - {-17592186044415ll, string("\001\360\000\000\000\000\001", 7)}, - {-17592186044416ll, string("\001\360\000\000\000\000\000", 7)}, - {-17592186044417ll, string("\001\357\377\377\377\377\377", 7)}, - {-35184372088831ll, string("\001\340\000\000\000\000\001", 7)}, - {-35184372088832ll, string("\001\340\000\000\000\000\000", 7)}, - {-35184372088833ll, string("\001\337\377\377\377\377\377", 7)}, - {-70368744177663ll, string("\001\300\000\000\000\000\001", 7)}, - {-70368744177664ll, string("\001\300\000\000\000\000\000", 7)}, - {-70368744177665ll, string("\001\277\377\377\377\377\377", 7)}, - {-140737488355327ll, string("\001\200\000\000\000\000\001", 7)}, - {-140737488355328ll, string("\001\200\000\000\000\000\000", 7)}, - {-140737488355329ll, string("\001\177\377\377\377\377\377", 7)}, - {-281474976710655ll, string("\001\000\000\000\000\000\001", 7)}, - {-281474976710656ll, string("\001\000\000\000\000\000\000", 7)}, - {-281474976710657ll, string("\000\376\377\377\377\377\377\377", 8)}, - {-562949953421311ll, string("\000\376\000\000\000\000\000\001", 8)}, - {-562949953421312ll, string("\000\376\000\000\000\000\000\000", 8)}, - {-562949953421313ll, string("\000\375\377\377\377\377\377\377", 8)}, - {-1125899906842623ll, string("\000\374\000\000\000\000\000\001", 8)}, - {-1125899906842624ll, string("\000\374\000\000\000\000\000\000", 8)}, - {-1125899906842625ll, string("\000\373\377\377\377\377\377\377", 8)}, - {-2251799813685247ll, string("\000\370\000\000\000\000\000\001", 8)}, - {-2251799813685248ll, string("\000\370\000\000\000\000\000\000", 8)}, - {-2251799813685249ll, string("\000\367\377\377\377\377\377\377", 8)}, - {-4503599627370495ll, string("\000\360\000\000\000\000\000\001", 8)}, - {-4503599627370496ll, string("\000\360\000\000\000\000\000\000", 8)}, - {-4503599627370497ll, string("\000\357\377\377\377\377\377\377", 8)}, - {-9007199254740991ll, string("\000\340\000\000\000\000\000\001", 8)}, - {-9007199254740992ll, string("\000\340\000\000\000\000\000\000", 8)}, - {-9007199254740993ll, string("\000\337\377\377\377\377\377\377", 8)}, - {-18014398509481983ll, string("\000\300\000\000\000\000\000\001", 8)}, - {-18014398509481984ll, string("\000\300\000\000\000\000\000\000", 8)}, - {-18014398509481985ll, string("\000\277\377\377\377\377\377\377", 8)}, - {-36028797018963967ll, string("\000\200\000\000\000\000\000\001", 8)}, - {-36028797018963968ll, string("\000\200\000\000\000\000\000\000", 8)}, - {-36028797018963969ll, string("\000\177\177\377\377\377\377\377\377", 9)}, - {-72057594037927935ll, string("\000\177\000\000\000\000\000\000\001", 9)}, - {-72057594037927936ll, string("\000\177\000\000\000\000\000\000\000", 9)}, - {-72057594037927937ll, string("\000~\377\377\377\377\377\377\377", 9)}, - {-144115188075855871ll, string("\000~\000\000\000\000\000\000\001", 9)}, - {-144115188075855872ll, string("\000~\000\000\000\000\000\000\000", 9)}, - {-144115188075855873ll, string("\000}\377\377\377\377\377\377\377", 9)}, - {-288230376151711743ll, string("\000|\000\000\000\000\000\000\001", 9)}, - {-288230376151711744ll, string("\000|\000\000\000\000\000\000\000", 9)}, - {-288230376151711745ll, string("\000{\377\377\377\377\377\377\377", 9)}, - {-576460752303423487ll, string("\000x\000\000\000\000\000\000\001", 9)}, - {-576460752303423488ll, string("\000x\000\000\000\000\000\000\000", 9)}, - {-576460752303423489ll, string("\000w\377\377\377\377\377\377\377", 9)}, - {-1152921504606846975ll, string("\000p\000\000\000\000\000\000\001", 9)}, - {-1152921504606846976ll, string("\000p\000\000\000\000\000\000\000", 9)}, - {-1152921504606846977ll, string("\000o\377\377\377\377\377\377\377", 9)}, - {-2305843009213693951ll, string("\000`\000\000\000\000\000\000\001", 9)}, - {-2305843009213693952ll, string("\000`\000\000\000\000\000\000\000", 9)}, - {-2305843009213693953ll, string("\000_\377\377\377\377\377\377\377", 9)}, - {-4611686018427387903ll, string("\000@\000\000\000\000\000\000\001", 9)}, - {-4611686018427387904ll, string("\000@\000\000\000\000\000\000\000", 9)}, + ByteSequence("\000?\200\000\000\000\000\000\000\001")}, + {0ll, ByteSequence("\200")}, + {-1ll, ByteSequence("\177")}, + {-2ll, ByteSequence("~")}, + {-1ll, ByteSequence("\177")}, + {-2ll, ByteSequence("~")}, + {-3ll, ByteSequence("}")}, + {-3ll, ByteSequence("}")}, + {-4ll, ByteSequence("|")}, + {-5ll, ByteSequence("{")}, + {-7ll, ByteSequence("y")}, + {-8ll, ByteSequence("x")}, + {-9ll, ByteSequence("w")}, + {-15ll, ByteSequence("q")}, + {-16ll, ByteSequence("p")}, + {-17ll, ByteSequence("o")}, + {-31ll, ByteSequence("a")}, + {-32ll, ByteSequence("`")}, + {-33ll, ByteSequence("_")}, + {-63ll, ByteSequence("A")}, + {-64ll, ByteSequence("@")}, + {-65ll, ByteSequence("?\277")}, + {-127ll, ByteSequence("?\201")}, + {-128ll, ByteSequence("?\200")}, + {-129ll, ByteSequence("?\177")}, + {-255ll, ByteSequence("?\001")}, + {-256ll, ByteSequence("?\000")}, + {-257ll, ByteSequence(">\377")}, + {-511ll, ByteSequence(">\001")}, + {-512ll, ByteSequence(">\000")}, + {-513ll, ByteSequence("=\377")}, + {-1023ll, ByteSequence("<\001")}, + {-1024ll, ByteSequence("<\000")}, + {-1025ll, ByteSequence(";\377")}, + {-2047ll, ByteSequence("8\001")}, + {-2048ll, ByteSequence("8\000")}, + {-2049ll, ByteSequence("7\377")}, + {-4095ll, ByteSequence("0\001")}, + {-4096ll, ByteSequence("0\000")}, + {-4097ll, ByteSequence("/\377")}, + {-8191ll, ByteSequence(" \001")}, + {-8192ll, ByteSequence(" \000")}, + {-8193ll, ByteSequence("\037\337\377")}, + {-16383ll, ByteSequence("\037\300\001")}, + {-16384ll, ByteSequence("\037\300\000")}, + {-16385ll, ByteSequence("\037\277\377")}, + {-32767ll, ByteSequence("\037\200\001")}, + {-32768ll, ByteSequence("\037\200\000")}, + {-32769ll, ByteSequence("\037\177\377")}, + {-65535ll, ByteSequence("\037\000\001")}, + {-65536ll, ByteSequence("\037\000\000")}, + {-65537ll, ByteSequence("\036\377\377")}, + {-131071ll, ByteSequence("\036\000\001")}, + {-131072ll, ByteSequence("\036\000\000")}, + {-131073ll, ByteSequence("\035\377\377")}, + {-262143ll, ByteSequence("\034\000\001")}, + {-262144ll, ByteSequence("\034\000\000")}, + {-262145ll, ByteSequence("\033\377\377")}, + {-524287ll, ByteSequence("\030\000\001")}, + {-524288ll, ByteSequence("\030\000\000")}, + {-524289ll, ByteSequence("\027\377\377")}, + {-1048575ll, ByteSequence("\020\000\001")}, + {-1048576ll, ByteSequence("\020\000\000")}, + {-1048577ll, ByteSequence("\017\357\377\377")}, + {-2097151ll, ByteSequence("\017\340\000\001")}, + {-2097152ll, ByteSequence("\017\340\000\000")}, + {-2097153ll, ByteSequence("\017\337\377\377")}, + {-4194303ll, ByteSequence("\017\300\000\001")}, + {-4194304ll, ByteSequence("\017\300\000\000")}, + {-4194305ll, ByteSequence("\017\277\377\377")}, + {-8388607ll, ByteSequence("\017\200\000\001")}, + {-8388608ll, ByteSequence("\017\200\000\000")}, + {-8388609ll, ByteSequence("\017\177\377\377")}, + {-16777215ll, ByteSequence("\017\000\000\001")}, + {-16777216ll, ByteSequence("\017\000\000\000")}, + {-16777217ll, ByteSequence("\016\377\377\377")}, + {-33554431ll, ByteSequence("\016\000\000\001")}, + {-33554432ll, ByteSequence("\016\000\000\000")}, + {-33554433ll, ByteSequence("\r\377\377\377")}, + {-67108863ll, ByteSequence("\014\000\000\001")}, + {-67108864ll, ByteSequence("\014\000\000\000")}, + {-67108865ll, ByteSequence("\013\377\377\377")}, + {-134217727ll, ByteSequence("\010\000\000\001")}, + {-134217728ll, ByteSequence("\010\000\000\000")}, + {-134217729ll, ByteSequence("\007\367\377\377\377")}, + {-268435455ll, ByteSequence("\007\360\000\000\001")}, + {-268435456ll, ByteSequence("\007\360\000\000\000")}, + {-268435457ll, ByteSequence("\007\357\377\377\377")}, + {-536870911ll, ByteSequence("\007\340\000\000\001")}, + {-536870912ll, ByteSequence("\007\340\000\000\000")}, + {-536870913ll, ByteSequence("\007\337\377\377\377")}, + {-1073741823ll, ByteSequence("\007\300\000\000\001")}, + {-1073741824ll, ByteSequence("\007\300\000\000\000")}, + {-1073741825ll, ByteSequence("\007\277\377\377\377")}, + {-2147483647ll, ByteSequence("\007\200\000\000\001")}, + {-2147483648ll, ByteSequence("\007\200\000\000\000")}, + {-2147483649ll, ByteSequence("\007\177\377\377\377")}, + {-4294967295ll, ByteSequence("\007\000\000\000\001")}, + {-4294967296ll, ByteSequence("\007\000\000\000\000")}, + {-4294967297ll, ByteSequence("\006\377\377\377\377")}, + {-8589934591ll, ByteSequence("\006\000\000\000\001")}, + {-8589934592ll, ByteSequence("\006\000\000\000\000")}, + {-8589934593ll, ByteSequence("\005\377\377\377\377")}, + {-17179869183ll, ByteSequence("\004\000\000\000\001")}, + {-17179869184ll, ByteSequence("\004\000\000\000\000")}, + {-17179869185ll, ByteSequence("\003\373\377\377\377\377")}, + {-34359738367ll, ByteSequence("\003\370\000\000\000\001")}, + {-34359738368ll, ByteSequence("\003\370\000\000\000\000")}, + {-34359738369ll, ByteSequence("\003\367\377\377\377\377")}, + {-68719476735ll, ByteSequence("\003\360\000\000\000\001")}, + {-68719476736ll, ByteSequence("\003\360\000\000\000\000")}, + {-68719476737ll, ByteSequence("\003\357\377\377\377\377")}, + {-137438953471ll, ByteSequence("\003\340\000\000\000\001")}, + {-137438953472ll, ByteSequence("\003\340\000\000\000\000")}, + {-137438953473ll, ByteSequence("\003\337\377\377\377\377")}, + {-274877906943ll, ByteSequence("\003\300\000\000\000\001")}, + {-274877906944ll, ByteSequence("\003\300\000\000\000\000")}, + {-274877906945ll, ByteSequence("\003\277\377\377\377\377")}, + {-549755813887ll, ByteSequence("\003\200\000\000\000\001")}, + {-549755813888ll, ByteSequence("\003\200\000\000\000\000")}, + {-549755813889ll, ByteSequence("\003\177\377\377\377\377")}, + {-1099511627775ll, ByteSequence("\003\000\000\000\000\001")}, + {-1099511627776ll, ByteSequence("\003\000\000\000\000\000")}, + {-1099511627777ll, ByteSequence("\002\377\377\377\377\377")}, + {-2199023255551ll, ByteSequence("\002\000\000\000\000\001")}, + {-2199023255552ll, ByteSequence("\002\000\000\000\000\000")}, + {-2199023255553ll, ByteSequence("\001\375\377\377\377\377\377")}, + {-4398046511103ll, ByteSequence("\001\374\000\000\000\000\001")}, + {-4398046511104ll, ByteSequence("\001\374\000\000\000\000\000")}, + {-4398046511105ll, ByteSequence("\001\373\377\377\377\377\377")}, + {-8796093022207ll, ByteSequence("\001\370\000\000\000\000\001")}, + {-8796093022208ll, ByteSequence("\001\370\000\000\000\000\000")}, + {-8796093022209ll, ByteSequence("\001\367\377\377\377\377\377")}, + {-17592186044415ll, ByteSequence("\001\360\000\000\000\000\001")}, + {-17592186044416ll, ByteSequence("\001\360\000\000\000\000\000")}, + {-17592186044417ll, ByteSequence("\001\357\377\377\377\377\377")}, + {-35184372088831ll, ByteSequence("\001\340\000\000\000\000\001")}, + {-35184372088832ll, ByteSequence("\001\340\000\000\000\000\000")}, + {-35184372088833ll, ByteSequence("\001\337\377\377\377\377\377")}, + {-70368744177663ll, ByteSequence("\001\300\000\000\000\000\001")}, + {-70368744177664ll, ByteSequence("\001\300\000\000\000\000\000")}, + {-70368744177665ll, ByteSequence("\001\277\377\377\377\377\377")}, + {-140737488355327ll, ByteSequence("\001\200\000\000\000\000\001")}, + {-140737488355328ll, ByteSequence("\001\200\000\000\000\000\000")}, + {-140737488355329ll, ByteSequence("\001\177\377\377\377\377\377")}, + {-281474976710655ll, ByteSequence("\001\000\000\000\000\000\001")}, + {-281474976710656ll, ByteSequence("\001\000\000\000\000\000\000")}, + {-281474976710657ll, ByteSequence("\000\376\377\377\377\377\377\377")}, + {-562949953421311ll, ByteSequence("\000\376\000\000\000\000\000\001")}, + {-562949953421312ll, ByteSequence("\000\376\000\000\000\000\000\000")}, + {-562949953421313ll, ByteSequence("\000\375\377\377\377\377\377\377")}, + {-1125899906842623ll, ByteSequence("\000\374\000\000\000\000\000\001")}, + {-1125899906842624ll, ByteSequence("\000\374\000\000\000\000\000\000")}, + {-1125899906842625ll, ByteSequence("\000\373\377\377\377\377\377\377")}, + {-2251799813685247ll, ByteSequence("\000\370\000\000\000\000\000\001")}, + {-2251799813685248ll, ByteSequence("\000\370\000\000\000\000\000\000")}, + {-2251799813685249ll, ByteSequence("\000\367\377\377\377\377\377\377")}, + {-4503599627370495ll, ByteSequence("\000\360\000\000\000\000\000\001")}, + {-4503599627370496ll, ByteSequence("\000\360\000\000\000\000\000\000")}, + {-4503599627370497ll, ByteSequence("\000\357\377\377\377\377\377\377")}, + {-9007199254740991ll, ByteSequence("\000\340\000\000\000\000\000\001")}, + {-9007199254740992ll, ByteSequence("\000\340\000\000\000\000\000\000")}, + {-9007199254740993ll, ByteSequence("\000\337\377\377\377\377\377\377")}, + {-18014398509481983ll, ByteSequence("\000\300\000\000\000\000\000\001")}, + {-18014398509481984ll, ByteSequence("\000\300\000\000\000\000\000\000")}, + {-18014398509481985ll, ByteSequence("\000\277\377\377\377\377\377\377")}, + {-36028797018963967ll, ByteSequence("\000\200\000\000\000\000\000\001")}, + {-36028797018963968ll, ByteSequence("\000\200\000\000\000\000\000\000")}, + {-36028797018963969ll, + ByteSequence("\000\177\177\377\377\377\377\377\377")}, + {-72057594037927935ll, + ByteSequence("\000\177\000\000\000\000\000\000\001")}, + {-72057594037927936ll, + ByteSequence("\000\177\000\000\000\000\000\000\000")}, + {-72057594037927937ll, ByteSequence("\000~\377\377\377\377\377\377\377")}, + {-144115188075855871ll, + ByteSequence("\000~\000\000\000\000\000\000\001")}, + {-144115188075855872ll, + ByteSequence("\000~\000\000\000\000\000\000\000")}, + {-144115188075855873ll, + ByteSequence("\000}\377\377\377\377\377\377\377")}, + {-288230376151711743ll, + ByteSequence("\000|\000\000\000\000\000\000\001")}, + {-288230376151711744ll, + ByteSequence("\000|\000\000\000\000\000\000\000")}, + {-288230376151711745ll, + ByteSequence("\000{\377\377\377\377\377\377\377")}, + {-576460752303423487ll, + ByteSequence("\000x\000\000\000\000\000\000\001")}, + {-576460752303423488ll, + ByteSequence("\000x\000\000\000\000\000\000\000")}, + {-576460752303423489ll, + ByteSequence("\000w\377\377\377\377\377\377\377")}, + {-1152921504606846975ll, + ByteSequence("\000p\000\000\000\000\000\000\001")}, + {-1152921504606846976ll, + ByteSequence("\000p\000\000\000\000\000\000\000")}, + {-1152921504606846977ll, + ByteSequence("\000o\377\377\377\377\377\377\377")}, + {-2305843009213693951ll, + ByteSequence("\000`\000\000\000\000\000\000\001")}, + {-2305843009213693952ll, + ByteSequence("\000`\000\000\000\000\000\000\000")}, + {-2305843009213693953ll, + ByteSequence("\000_\377\377\377\377\377\377\377")}, + {-4611686018427387903ll, + ByteSequence("\000@\000\000\000\000\000\000\001")}, + {-4611686018427387904ll, + ByteSequence("\000@\000\000\000\000\000\000\000")}, {-4611686018427387905ll, - string("\000?\277\377\377\377\377\377\377\377", 10)}, + ByteSequence("\000?\277\377\377\377\377\377\377\377")}, {-9223372036854775807ll, - string("\000?\200\000\000\000\000\000\000\001", 10)}, + ByteSequence("\000?\200\000\000\000\000\000\000\001")}, {9223372036854775807ll, - string("\377\300\177\377\377\377\377\377\377\377", 10)}, + ByteSequence("\377\300\177\377\377\377\377\377\377\377")}, }; for (const auto& t : data) { int64 num = t.first; @@ -1150,7 +1209,7 @@ TEST(EncodingIsExpected, Signed) { } } -static void BM_WriteString(int n, int len) { +void BM_WriteString(int n, int len) { testing::StopTiming(); random::PhiloxRandom philox(301, 17); random::SimplePhilox rnd(&philox); @@ -1168,7 +1227,7 @@ static void BM_WriteString(int n, int len) { } } -static void BM_ReadString(int n, int len) { +void BM_ReadString(int n, int len) { testing::StopTiming(); random::PhiloxRandom philox(301, 17); random::SimplePhilox rnd(&philox); @@ -1189,11 +1248,12 @@ static void BM_ReadString(int n, int len) { } } -static void BM_WriteStringIncreasing(int n, int len) { BM_WriteString(n, len); } -static void BM_ReadStringIncreasing(int n, int len) { BM_ReadString(n, len); } +void BM_WriteStringIncreasing(int n, int len) { BM_WriteString(n, len); } +void BM_ReadStringIncreasing(int n, int len) { BM_ReadString(n, len); } BENCHMARK(BM_WriteStringIncreasing)->Range(0, 1024); BENCHMARK(BM_ReadStringIncreasing)->Range(0, 1024); +} // namespace } // namespace strings } // namespace tensorflow