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

Unified Diff: sql/connection_unittest.cc

Issue 10702203: Modify sql unittests to pass on iOS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: I'm burning through patchsets like nobody's business. Created 8 years, 5 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 | « no previous file | sql/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/connection_unittest.cc
diff --git a/sql/connection_unittest.cc b/sql/connection_unittest.cc
index 97dd152e3feb8e8d612c2f438d083853487cba69..773de5bcf5a3a75a308490f8d54f4e567baa7aed 100644
--- a/sql/connection_unittest.cc
+++ b/sql/connection_unittest.cc
@@ -173,15 +173,16 @@ TEST_F(SQLConnectionTest, Raze) {
// Test that Raze() maintains page_size.
TEST_F(SQLConnectionTest, RazePageSize) {
- const int kPageSize = 4096;
-
- // Make sure that the default size isn't already |kPageSize|.
+ // Fetch the default page size and double it for use in this test.
// Scoped to release statement before Close().
+ int default_page_size = 0;
{
sql::Statement s(db().GetUniqueStatement("PRAGMA page_size"));
ASSERT_TRUE(s.Step());
- ASSERT_NE(kPageSize, s.ColumnInt(0));
+ default_page_size = s.ColumnInt(0);
}
+ ASSERT_GT(default_page_size, 0);
+ const int kPageSize = 2 * default_page_size;
// Re-open the database to allow setting the page size.
db().Close();
« no previous file with comments | « no previous file | sql/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698