diff options
author | zork@google.com <zork@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-08 01:21:33 +0000 |
---|---|---|
committer | zork@google.com <zork@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-08 01:21:33 +0000 |
commit | 673ccc1d607a6d7d280d89fedd3fb3bc906a7e27 (patch) | |
tree | 39cbd4c93f2ba1ad0c8dd50c5de3c125427367f2 /chrome/browser/sync/util/query_helpers_unittest.cc | |
parent | 68884f33149a76b6e8b1c6614deb4b1aef74a4d2 (diff) | |
download | chromium_src-673ccc1d607a6d7d280d89fedd3fb3bc906a7e27.zip chromium_src-673ccc1d607a6d7d280d89fedd3fb3bc906a7e27.tar.gz chromium_src-673ccc1d607a6d7d280d89fedd3fb3bc906a7e27.tar.bz2 |
Finish removing query_helpers.*
BUG=none
TEST=Run sync_unit_tests
Review URL: http://codereview.chromium.org/526002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35765 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/util/query_helpers_unittest.cc')
-rw-r--r-- | chrome/browser/sync/util/query_helpers_unittest.cc | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/chrome/browser/sync/util/query_helpers_unittest.cc b/chrome/browser/sync/util/query_helpers_unittest.cc deleted file mode 100644 index 43c0488..0000000 --- a/chrome/browser/sync/util/query_helpers_unittest.cc +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/sync/util/query_helpers.h" - -#include <limits> -#include <string> - -#include "base/file_util.h" -#include "chrome/common/sqlite_utils.h" -#include "chrome/test/file_test_utils.h" -#include "testing/gtest/include/gtest/gtest.h" - -using std::numeric_limits; -using std::string; - -TEST(QueryHelpers, APEncode) { - string test; - char i; - for (i = numeric_limits<char>::min(); i < numeric_limits<char>::max(); ++i) - test.push_back(i); - test.push_back(i); - const string encoded = APEncode(test); - const string decoded = APDecode(encoded); - ASSERT_EQ(test, decoded); -} - -TEST(QueryHelpers, TestExecFailure) { - FilePath test_database; - file_util::GetCurrentDirectory(&test_database); - test_database = test_database.Append( - FILE_PATH_LITERAL("queryhelper_test.sqlite3")); - // Cleanup left-over file, if present. - file_util::Delete(test_database, true); - FileAutoDeleter file_deleter(test_database); - { - sqlite3* database = NULL; - ASSERT_EQ(SQLITE_OK, SqliteOpen(test_database, &database)); - sqlite_utils::scoped_sqlite_db_ptr database_deleter(database); - EXPECT_EQ(SQLITE_DONE, Exec(database, "CREATE TABLE test_table (idx int)")); - EXPECT_NE(SQLITE_DONE, Exec(database, "ALTER TABLE test_table ADD COLUMN " - "broken int32 default ?", -1)); - } -} |