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

Side by Side Diff: third_party/leveldatabase/env_chromium_unittest.cc

Issue 230073003: Enable leveldb build in GN world. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more sign vs unsigned fixes for leveldatabase Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « BUILD.gn ('k') | tools/gn/secondary/third_party/leveldatabase/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/files/file.h" 6 #include "base/files/file.h"
7 #include "base/files/file_enumerator.h" 7 #include "base/files/file_enumerator.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/test/test_suite.h" 10 #include "base/test/test_suite.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 FILE* f = fopen(new_file_dir.AsUTF8Unsafe().c_str(), "w"); 239 FILE* f = fopen(new_file_dir.AsUTF8Unsafe().c_str(), "w");
240 if (f) { 240 if (f) {
241 fputs("Temp file contents", f); 241 fputs("Temp file contents", f);
242 fclose(f); 242 fclose(f);
243 } 243 }
244 244
245 Env* env = IDBEnv(); 245 Env* env = IDBEnv();
246 std::vector<std::string> result; 246 std::vector<std::string> result;
247 leveldb::Status status = env->GetChildren(dir.AsUTF8Unsafe(), &result); 247 leveldb::Status status = env->GetChildren(dir.AsUTF8Unsafe(), &result);
248 EXPECT_TRUE(status.ok()); 248 EXPECT_TRUE(status.ok());
249 EXPECT_EQ(1, result.size()); 249 EXPECT_EQ(1U, result.size());
250 250
251 // And a second time should also return one result 251 // And a second time should also return one result
252 status = env->GetChildren(dir.AsUTF8Unsafe(), &result); 252 status = env->GetChildren(dir.AsUTF8Unsafe(), &result);
253 EXPECT_TRUE(status.ok()); 253 EXPECT_TRUE(status.ok());
254 EXPECT_EQ(1, result.size()); 254 EXPECT_EQ(1U, result.size());
255 } 255 }
256 256
257 int main(int argc, char** argv) { return base::TestSuite(argc, argv).Run(); } 257 int main(int argc, char** argv) { return base::TestSuite(argc, argv).Run(); }
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | tools/gn/secondary/third_party/leveldatabase/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698