aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/db/version_edit_test.cc
diff options
context:
space:
mode:
authorSfan5 <sfan5@live.de>2013-09-09 22:46:18 +0200
committerSfan5 <sfan5@live.de>2013-09-09 22:50:51 +0200
commit3725179736e2b5372664163470e7ef3dc76529a4 (patch)
tree7a56c929ae75530679b3d2f7c9c02fb361760219 /src/leveldb/db/version_edit_test.cc
parent1f3402e7a1e160c4be25c596f33d916b988075fb (diff)
downloadminetest-3725179736e2b5372664163470e7ef3dc76529a4.tar.gz
minetest-3725179736e2b5372664163470e7ef3dc76529a4.tar.bz2
minetest-3725179736e2b5372664163470e7ef3dc76529a4.zip
Use system-wide LevelDB instead of bundled one
Diffstat (limited to 'src/leveldb/db/version_edit_test.cc')
-rw-r--r--src/leveldb/db/version_edit_test.cc46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/leveldb/db/version_edit_test.cc b/src/leveldb/db/version_edit_test.cc
deleted file mode 100644
index 280310b49..000000000
--- a/src/leveldb/db/version_edit_test.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// 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 "db/version_edit.h"
-#include "util/testharness.h"
-
-namespace leveldb {
-
-static void TestEncodeDecode(const VersionEdit& edit) {
- std::string encoded, encoded2;
- edit.EncodeTo(&encoded);
- VersionEdit parsed;
- Status s = parsed.DecodeFrom(encoded);
- ASSERT_TRUE(s.ok()) << s.ToString();
- parsed.EncodeTo(&encoded2);
- ASSERT_EQ(encoded, encoded2);
-}
-
-class VersionEditTest { };
-
-TEST(VersionEditTest, EncodeDecode) {
- static const uint64_t kBig = 1ull << 50;
-
- VersionEdit edit;
- for (int i = 0; i < 4; i++) {
- TestEncodeDecode(edit);
- edit.AddFile(3, kBig + 300 + i, kBig + 400 + i,
- InternalKey("foo", kBig + 500 + i, kTypeValue),
- InternalKey("zoo", kBig + 600 + i, kTypeDeletion));
- edit.DeleteFile(4, kBig + 700 + i);
- edit.SetCompactPointer(i, InternalKey("x", kBig + 900 + i, kTypeValue));
- }
-
- edit.SetComparatorName("foo");
- edit.SetLogNumber(kBig + 100);
- edit.SetNextFile(kBig + 200);
- edit.SetLastSequence(kBig + 1000);
- TestEncodeDecode(edit);
-}
-
-} // namespace leveldb
-
-int main(int argc, char** argv) {
- return leveldb::test::RunAllTests();
-}