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

Side by Side Diff: chrome/browser/sync/syncable/directory_backing_store_unittest.cc

Issue 6300001: Clang: enable -Wbool-conversions and -Wunused-variables on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Formatting fix Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "app/sql/connection.h" 9 #include "app/sql/connection.h"
10 #include "app/sql/statement.h" 10 #include "app/sql/statement.h"
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 connection.DoesColumnExist("models", "last_download_timestamp")); 980 connection.DoesColumnExist("models", "last_download_timestamp"));
981 ASSERT_TRUE( 981 ASSERT_TRUE(
982 connection.DoesColumnExist("models", "model_id")); 982 connection.DoesColumnExist("models", "model_id"));
983 983
984 sql::Statement s(connection.GetUniqueStatement("SELECT model_id, " 984 sql::Statement s(connection.GetUniqueStatement("SELECT model_id, "
985 "initial_sync_ended, last_download_timestamp FROM models")); 985 "initial_sync_ended, last_download_timestamp FROM models"));
986 ASSERT_TRUE(s.Step()); 986 ASSERT_TRUE(s.Step());
987 std::string model_id = s.ColumnString(0); 987 std::string model_id = s.ColumnString(0);
988 EXPECT_EQ("C2881000", base::HexEncode(model_id.data(), model_id.size())) 988 EXPECT_EQ("C2881000", base::HexEncode(model_id.data(), model_id.size()))
989 << "Model ID is expected to be the empty BookmarkSpecifics proto."; 989 << "Model ID is expected to be the empty BookmarkSpecifics proto.";
990 EXPECT_EQ(true, s.ColumnBool(1)); 990 EXPECT_TRUE(s.ColumnBool(1));
991 EXPECT_EQ(694, s.ColumnInt64(2)); 991 EXPECT_EQ(694, s.ColumnInt64(2));
992 ASSERT_FALSE(s.Step()); 992 ASSERT_FALSE(s.Step());
993 } 993 }
994 994
995 995
996 TEST_F(DirectoryBackingStoreTest, MigrateVersion71To72) { 996 TEST_F(DirectoryBackingStoreTest, MigrateVersion71To72) {
997 SetUpVersion71Database(); 997 SetUpVersion71Database();
998 998
999 { 999 {
1000 sql::Connection connection; 1000 sql::Connection connection;
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 1383
1384 STLDeleteElements(&index); 1384 STLDeleteElements(&index);
1385 dbs->LoadEntries(&index); 1385 dbs->LoadEntries(&index);
1386 EXPECT_EQ(0U, index.size()); 1386 EXPECT_EQ(0U, index.size());
1387 1387
1388 dbs->EndLoad(); 1388 dbs->EndLoad();
1389 dbs->EndSave(); 1389 dbs->EndSave();
1390 } 1390 }
1391 1391
1392 } // namespace syncable 1392 } // namespace syncable
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698