diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-12 23:50:59 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-12 23:50:59 +0000 |
commit | eff1fa525ce9cf8965cf187c9e7aef8c2db39bf9 (patch) | |
tree | 11404979e9dfe31379468712d8b3acf5c552b345 /sql/sqlite_features_unittest.cc | |
parent | d2528e607d9f876b4db237ebf37a57dcd45a4dbf (diff) | |
download | chromium_src-eff1fa525ce9cf8965cf187c9e7aef8c2db39bf9.zip chromium_src-eff1fa525ce9cf8965cf187c9e7aef8c2db39bf9.tar.gz chromium_src-eff1fa525ce9cf8965cf187c9e7aef8c2db39bf9.tar.bz2 |
Put debugging assertions into sql::Statement.
Pulls out the core of gbillock's http://codereview.chromium.org/8283002/
- Move NOTREACHED and similar checks into the sql:: implementation code.
- Add malformed SQL checks to Connection::Execute.
- Add SQL-checking convenience methods to Connection.
The general idea is that the sql:: framework assumes valid statements,
rather than having client code contain scattered ad-hoc (and thus
inconsistent) checks.
This version puts back Statement operator overloading and loosy-goosy
Execute() calls to allow other code to be updated in small batches.
R=gbillock@chromium.org,jhawkins@chromium.org,dhollowa@chromium.org
BUG=none
TEST=sql_unittests,unit_tests:*Table*.*
Review URL: http://codereview.chromium.org/8899012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114118 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sql/sqlite_features_unittest.cc')
-rw-r--r-- | sql/sqlite_features_unittest.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sqlite_features_unittest.cc b/sql/sqlite_features_unittest.cc index a25413d..e5cca49 100644 --- a/sql/sqlite_features_unittest.cc +++ b/sql/sqlite_features_unittest.cc @@ -81,7 +81,8 @@ class SQLiteFeaturesTest : public testing::Test { // Do not include fts1 support, it is not useful, and nobody is // looking at it. TEST_F(SQLiteFeaturesTest, NoFTS1) { - ASSERT_FALSE(db().Execute("CREATE VIRTUAL TABLE foo USING fts1(x)")); + ASSERT_EQ(SQLITE_ERROR, db().ExecuteAndReturnErrorCode( + "CREATE VIRTUAL TABLE foo USING fts1(x)")); } // fts2 is used for older history files, so we're signed on for |