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

Side by Side Diff: sql/sqlite_features_unittest.cc

Issue 606033002: Make FTS2 inclusion in SQLite optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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
« no previous file with comments | « sql/sql.gyp ('k') | third_party/sqlite/sqlite.gyp » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "sql/connection.h" 10 #include "sql/connection.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 std::string sql_text_; 56 std::string sql_text_;
57 }; 57 };
58 58
59 // Do not include fts1 support, it is not useful, and nobody is 59 // Do not include fts1 support, it is not useful, and nobody is
60 // looking at it. 60 // looking at it.
61 TEST_F(SQLiteFeaturesTest, NoFTS1) { 61 TEST_F(SQLiteFeaturesTest, NoFTS1) {
62 ASSERT_EQ(SQLITE_ERROR, db().ExecuteAndReturnErrorCode( 62 ASSERT_EQ(SQLITE_ERROR, db().ExecuteAndReturnErrorCode(
63 "CREATE VIRTUAL TABLE foo USING fts1(x)")); 63 "CREATE VIRTUAL TABLE foo USING fts1(x)"));
64 } 64 }
65 65
66 #if !defined(OS_IOS) 66 #if defined(SQLITE_ENABLE_FTS2)
67 // fts2 is used for older history files, so we're signed on for keeping our 67 // fts2 is used for older history files, so we're signed on for keeping our
68 // version up-to-date. iOS does not include fts2, so this test does not run on 68 // version up-to-date.
69 // iOS.
70 // TODO(shess): Think up a crazy way to get out from having to support 69 // TODO(shess): Think up a crazy way to get out from having to support
71 // this forever. 70 // this forever.
72 TEST_F(SQLiteFeaturesTest, FTS2) { 71 TEST_F(SQLiteFeaturesTest, FTS2) {
73 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts2(x)")); 72 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts2(x)"));
74 } 73 }
75 #endif 74 #endif
76 75
77 // fts3 is used for current history files, and also for WebDatabase. 76 // fts3 is used for current history files, and also for WebDatabase.
78 TEST_F(SQLiteFeaturesTest, FTS3) { 77 TEST_F(SQLiteFeaturesTest, FTS3) {
79 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts3(x)")); 78 ASSERT_TRUE(db().Execute("CREATE VIRTUAL TABLE foo USING fts3(x)"));
80 } 79 }
81 80
82 } // namespace 81 } // namespace
OLDNEW
« no previous file with comments | « sql/sql.gyp ('k') | third_party/sqlite/sqlite.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698