diff UnitTestsSources/SQLiteChromiumTests.cpp @ 2655:c196d76cb8fa jobs

serialization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 05 Jun 2018 17:57:49 +0200
parents 878b59270859
children 22524fd06225
line wrap: on
line diff
--- a/UnitTestsSources/SQLiteChromiumTests.cpp	Tue Jun 05 17:09:18 2018 +0200
+++ b/UnitTestsSources/SQLiteChromiumTests.cpp	Tue Jun 05 17:57:49 2018 +0200
@@ -51,35 +51,38 @@
  ** http://src.chromium.org/viewvc/chrome/trunk/src/sql/connection_unittest.cc
  ********************************************************************/
 
-class SQLConnectionTest : public testing::Test 
+namespace
 {
-public:
-  SQLConnectionTest()
-  {
-  }
-
-  virtual ~SQLConnectionTest()
-  {
-  }
-
-  virtual void SetUp() 
+  class SQLConnectionTest : public testing::Test 
   {
-    db_.OpenInMemory();
-  }
+  public:
+    SQLConnectionTest()
+    {
+    }
 
-  virtual void TearDown() 
-  {
-    db_.Close();
-  }
+    virtual ~SQLConnectionTest()
+    {
+    }
+
+    virtual void SetUp() 
+    {
+      db_.OpenInMemory();
+    }
 
-  Connection& db() 
-  { 
-    return db_; 
-  }
+    virtual void TearDown() 
+    {
+      db_.Close();
+    }
 
-private:
-  Connection db_;
-};
+    Connection& db() 
+    { 
+      return db_; 
+    }
+
+  private:
+    Connection db_;
+  };
+}
 
 
 
@@ -266,23 +269,26 @@
  ** http://src.chromium.org/viewvc/chrome/trunk/src/sql/transaction_unittest.cc
  ********************************************************************/
 
-class SQLTransactionTest : public SQLConnectionTest
+namespace
 {
-public:
-  virtual void SetUp()
+  class SQLTransactionTest : public SQLConnectionTest
   {
-    SQLConnectionTest::SetUp();
-    ASSERT_TRUE(db().Execute("CREATE TABLE foo (a, b)"));
-  }
+  public:
+    virtual void SetUp()
+    {
+      SQLConnectionTest::SetUp();
+      ASSERT_TRUE(db().Execute("CREATE TABLE foo (a, b)"));
+    }
 
-  // Returns the number of rows in table "foo".
-  int CountFoo() 
-  {
-    Statement count(db(), "SELECT count(*) FROM foo");
-    count.Step();
-    return count.ColumnInt(0);
-  }
-};
+    // Returns the number of rows in table "foo".
+    int CountFoo() 
+    {
+      Statement count(db(), "SELECT count(*) FROM foo");
+      count.Step();
+      return count.ColumnInt(0);
+    }
+  };
+}
 
 
 TEST_F(SQLTransactionTest, Commit) {