Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Unified Diff: third_party/leveldatabase/env_chromium_unittest.cc

Issue 936073003: Remove unused errno parsing for leveldb status codes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: FILE_OK -> FILE_ERROR_MAX Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/leveldatabase/env_chromium.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/leveldatabase/env_chromium_unittest.cc
diff --git a/third_party/leveldatabase/env_chromium_unittest.cc b/third_party/leveldatabase/env_chromium_unittest.cc
index 72a1efb3af355317d3e0709f82ab3878201a3b2b..48ee72c2f085452946a784403d40cdbbc2027dca 100644
--- a/third_party/leveldatabase/env_chromium_unittest.cc
+++ b/third_party/leveldatabase/env_chromium_unittest.cc
@@ -31,10 +31,10 @@ TEST(ErrorEncoding, OnlyAMethod) {
const MethodID in_method = leveldb_env::kSequentialFileRead;
const Status s = MakeIOError("Somefile.txt", "message", in_method);
MethodID method;
- int error = -75;
+ base::File::Error error = base::File::FILE_ERROR_MAX;
EXPECT_EQ(leveldb_env::METHOD_ONLY, ParseMethodAndError(s, &method, &error));
EXPECT_EQ(in_method, method);
- EXPECT_EQ(-75, error);
+ EXPECT_EQ(base::File::FILE_ERROR_MAX, error);
}
TEST(ErrorEncoding, FileError) {
@@ -42,7 +42,7 @@ TEST(ErrorEncoding, FileError) {
const base::File::Error fe = base::File::FILE_ERROR_INVALID_OPERATION;
const Status s = MakeIOError("Somefile.txt", "message", in_method, fe);
MethodID method;
- int error;
+ base::File::Error error;
EXPECT_EQ(leveldb_env::METHOD_AND_PFE,
ParseMethodAndError(s, &method, &error));
EXPECT_EQ(in_method, method);
@@ -52,10 +52,10 @@ TEST(ErrorEncoding, FileError) {
TEST(ErrorEncoding, NoEncodedMessage) {
Status s = Status::IOError("Some message", "from leveldb itself");
MethodID method = leveldb_env::kRandomAccessFileRead;
- int error = 4;
+ base::File::Error error = base::File::FILE_ERROR_MAX;
EXPECT_EQ(leveldb_env::NONE, ParseMethodAndError(s, &method, &error));
EXPECT_EQ(leveldb_env::kRandomAccessFileRead, method);
- EXPECT_EQ(4, error);
+ EXPECT_EQ(base::File::FILE_ERROR_MAX, error);
}
template <typename T>
« no previous file with comments | « third_party/leveldatabase/env_chromium.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698