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

Unified Diff: sql/transaction_unittest.cc

Issue 1176653002: mandoline filesystem: add a sqlite3 vfs to proxy filesystem usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT and fix the test import. Created 5 years, 6 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
« sql/test/test_helpers.cc ('K') | « sql/test/test_helpers.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/transaction_unittest.cc
diff --git a/sql/transaction_unittest.cc b/sql/transaction_unittest.cc
index 83d41259b2400380e98587266dc80a26eb1a8c94..179adcf3e55316a49ffb0d72d52a17c9c8021e8e 100644
--- a/sql/transaction_unittest.cc
+++ b/sql/transaction_unittest.cc
@@ -5,35 +5,26 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "sql/connection.h"
+#include "sql/correct_sql_test_base.h"
#include "sql/statement.h"
#include "sql/transaction.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/sqlite/sqlite3.h"
-class SQLTransactionTest : public testing::Test {
+class SQLTransactionTest : public sql::SQLTestBase {
public:
void SetUp() override {
- ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
- ASSERT_TRUE(db_.Open(
- temp_dir_.path().AppendASCII("SQLTransactionTest.db")));
+ SQLTestBase::SetUp();
ASSERT_TRUE(db().Execute("CREATE TABLE foo (a, b)"));
}
- void TearDown() override { db_.Close(); }
-
- sql::Connection& db() { return db_; }
-
// Returns the number of rows in table "foo".
int CountFoo() {
sql::Statement count(db().GetUniqueStatement("SELECT count(*) FROM foo"));
count.Step();
return count.ColumnInt(0);
}
-
- private:
- base::ScopedTempDir temp_dir_;
- sql::Connection db_;
};
TEST_F(SQLTransactionTest, Commit) {
« sql/test/test_helpers.cc ('K') | « sql/test/test_helpers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698