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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/leveldb_wrapper_unittest.cc

Issue 1358513003: Use correct IntToString variants in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.h" 5 #include "chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 void CreateDefaultDatabase() { 40 void CreateDefaultDatabase() {
41 leveldb::DB* db = db_->GetLevelDB(); 41 leveldb::DB* db = db_->GetLevelDB();
42 42
43 // Expected contents are 43 // Expected contents are
44 // {"a": "1", "ab": "0", "bb": "3", "d": "4"} 44 // {"a": "1", "ab": "0", "bb": "3", "d": "4"}
45 const char* keys[] = {"ab", "a", "d", "bb", "d"}; 45 const char* keys[] = {"ab", "a", "d", "bb", "d"};
46 for (size_t i = 0; i < arraysize(keys); ++i) { 46 for (size_t i = 0; i < arraysize(keys); ++i) {
47 leveldb::Status status = 47 leveldb::Status status =
48 db->Put(leveldb::WriteOptions(), keys[i], base::Int64ToString(i)); 48 db->Put(leveldb::WriteOptions(), keys[i], base::SizeTToString(i));
49 ASSERT_TRUE(status.ok()); 49 ASSERT_TRUE(status.ok());
50 } 50 }
51 } 51 }
52 52
53 LevelDBWrapper* GetDB() { 53 LevelDBWrapper* GetDB() {
54 return db_.get(); 54 return db_.get();
55 } 55 }
56 56
57 void CheckDBContents(const TestData expects[], size_t size) { 57 void CheckDBContents(const TestData expects[], size_t size) {
58 DCHECK(db_); 58 DCHECK(db_);
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 EXPECT_EQ(0, GetDB()->num_puts()); 233 EXPECT_EQ(0, GetDB()->num_puts());
234 EXPECT_EQ(0, GetDB()->num_deletes()); 234 EXPECT_EQ(0, GetDB()->num_deletes());
235 235
236 SCOPED_TRACE("DeleteTest_Commit"); 236 SCOPED_TRACE("DeleteTest_Commit");
237 CheckDBContents(merged_data, arraysize(merged_data)); 237 CheckDBContents(merged_data, arraysize(merged_data));
238 } 238 }
239 239
240 } // namespace drive_backend 240 } // namespace drive_backend
241 } // namespace sync_file_system 241 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/performance/sync_timing_helper.cc ('k') | chrome/browser/task_manager/task_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698