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

Side by Side Diff: sql/sqlite_features_unittest.cc

Issue 8899012: Put debugging assertions into sql::Statement. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 5 #include <string>
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "sql/connection.h" 10 #include "sql/connection.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 private: 75 private:
76 FilePath path_; 76 FilePath path_;
77 sql::Connection db_; 77 sql::Connection db_;
78 scoped_refptr<StatementErrorHandler> error_handler_; 78 scoped_refptr<StatementErrorHandler> error_handler_;
79 }; 79 };
80 80
81 // Do not include fts1 support, it is not useful, and nobody is 81 // Do not include fts1 support, it is not useful, and nobody is
82 // looking at it. 82 // looking at it.
83 TEST_F(SQLiteFeaturesTest, NoFTS1) { 83 TEST_F(SQLiteFeaturesTest, NoFTS1) {
84 ASSERT_FALSE(db().Execute("CREATE VIRTUAL TABLE foo USING fts1(x)")); 84 ASSERT_EQ(SQLITE_ERROR, db().ExecuteAndReturnErrorCode(
85 "CREATE VIRTUAL TABLE foo USING fts1(x)"));
85 } 86 }
86 87
87 // fts2 is used for older history files, so we're signed on for 88 // fts2 is used for older history files, so we're signed on for
88 // keeping our version up-to-date. 89 // keeping our version up-to-date.
89 // TODO(shess): Think up a crazy way to get out from having to support 90 // TODO(shess): Think up a crazy way to get out from having to support
90 // this forever. 91 // this forever.
91 TEST_F(SQLiteFeaturesTest, FTS2) { 92 TEST_F(SQLiteFeaturesTest, FTS2) {
92 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts2(x)")); 93 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts2(x)"));
93 } 94 }
94 95
95 // fts3 is used for current history files, and also for WebDatabase. 96 // fts3 is used for current history files, and also for WebDatabase.
96 TEST_F(SQLiteFeaturesTest, FTS3) { 97 TEST_F(SQLiteFeaturesTest, FTS3) {
97 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts3(x)")); 98 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts3(x)"));
98 } 99 }
99 100
100 } // namespace 101 } // namespace
OLDNEW
« sql/connection.cc ('K') | « sql/meta_table.cc ('k') | sql/statement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698