Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: installer/src/installer-lib/test/database_test.cpp

Issue 29329159: Issue #1185 - Fix formatting in installer-lib and its tests (Closed)
Patch Set: Created Oct. 15, 2015, 7:03 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: installer/src/installer-lib/test/database_test.cpp
===================================================================
--- a/installer/src/installer-lib/test/database_test.cpp
+++ b/installer/src/installer-lib/test/database_test.cpp
@@ -6,61 +6,61 @@
* There's a batch file for that purpose "run-tests.cmd".
*/
-TEST( Database, open )
+TEST(Database, open)
{
- FileSystemDatabase db( L"test-installer-lib.msi" ) ;
+ FileSystemDatabase db(L"test-installer-lib.msi");
}
class Database_F
: public ::testing::Test
{
protected:
- FileSystemDatabase db ;
+ FileSystemDatabase db;
Database_F()
- : db( L"test-installer-lib.msi" )
+ : db(L"test-installer-lib.msi")
{}
-} ;
+};
-TEST_F( Database_F, view_n_columns_and_n_rows )
+TEST_F(Database_F, view_n_columns_and_n_rows)
{
- View v( db, L"SELECT * FROM AbpUIText" ) ;
- Record r( v.First() ) ;
- unsigned int j ;
- for ( j = 0 ; r != v.End() ; ++ j )
+ View v(db, L"SELECT * FROM AbpUIText");
+ Record r(v.First());
+ unsigned int j;
+ for (j = 0 ; r != v.End() ; ++ j)
{
- ASSERT_EQ( 3, r.NumberOfFields() ) ;
- r = v.Next() ;
+ ASSERT_EQ(3, r.NumberOfFields());
+ r = v.Next();
}
- ASSERT_EQ( 4, j ) ;
+ ASSERT_EQ(4, j);
}
-TEST_F( Database_F, view_single_record )
+TEST_F(Database_F, view_single_record)
{
- View v( db, L"SELECT `content` FROM `AbpUIText` WHERE `component`='close_ie' and `id`='dialog_unknown'" ) ;
- Record r( v.First() ) ;
- ASSERT_EQ( 1, r.NumberOfFields() ) ;
- std::wstring s( r.ValueString( 1 ) ) ;
- std::wstring expected( L"IE is still running" ) ;
- ASSERT_GT( s.length(), expected.length() ) ;
- std::wstring prefix( s.substr( 0, expected.length() ) ) ;
- ASSERT_EQ( prefix, expected ) ;
- r = v.Next() ;
- ASSERT_EQ( v.End(), r ) ;
+ View v(db, L"SELECT `content` FROM `AbpUIText` WHERE `component`='close_ie' and `id`='dialog_unknown'");
+ Record r(v.First());
+ ASSERT_EQ(1, r.NumberOfFields());
+ std::wstring s(r.ValueString(1));
+ std::wstring expected(L"IE is still running");
+ ASSERT_GT(s.length(), expected.length());
+ std::wstring prefix(s.substr(0, expected.length()));
+ ASSERT_EQ(prefix, expected);
+ r = v.Next();
+ ASSERT_EQ(v.End(), r);
}
-TEST_F( Database_F, view_single_record_parametric )
+TEST_F(Database_F, view_single_record_parametric)
{
- View v( db, L"SELECT `content` FROM `AbpUIText` WHERE `component`='close_ie' and `id`=?" ) ;
- Record arg( 1 ) ;
- arg.AssignString( 1, L"dialog_unknown" ) ;
- Record r( v.First( arg ) ) ;
- ASSERT_EQ( 1, r.NumberOfFields() ) ;
- std::wstring s( r.ValueString( 1 ) ) ;
- std::wstring expected( L"IE is still running" ) ;
- ASSERT_GT( s.length(), expected.length() ) ;
- std::wstring prefix( s.substr( 0, expected.length() ) ) ;
- ASSERT_EQ( prefix, expected ) ;
- r = v.Next() ;
- ASSERT_EQ( v.End(), r ) ;
+ View v(db, L"SELECT `content` FROM `AbpUIText` WHERE `component`='close_ie' and `id`=?");
+ Record arg(1);
+ arg.AssignString(1, L"dialog_unknown");
+ Record r(v.First(arg));
+ ASSERT_EQ(1, r.NumberOfFields());
+ std::wstring s(r.ValueString(1));
+ std::wstring expected(L"IE is still running");
+ ASSERT_GT(s.length(), expected.length());
+ std::wstring prefix(s.substr(0, expected.length()));
+ ASSERT_EQ(prefix, expected);
+ r = v.Next();
+ ASSERT_EQ(v.End(), r);
}
« no previous file with comments | « installer/src/installer-lib/test/custom-action-fail.cpp ('k') | installer/src/installer-lib/test/exception_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld