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

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

Issue 5992177905696768: Issue #1186 - Rename symbols defined in 'installer-lib' (Closed)
Patch Set: fixed issues; rebased; new fixes from rebase Created June 19, 2015, 4:09 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
« no previous file with comments | « installer/src/installer-lib/session.cpp ('k') | installer/src/installer-lib/test/exception_test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
@@ -8,14 +8,14 @@
TEST( Database, open )
{
- File_System_Database db( L"test-installer-lib.msi" ) ;
+ FileSystemDatabase db( L"test-installer-lib.msi" ) ;
}
class Database_F
: public ::testing::Test
{
protected:
- File_System_Database db ;
+ FileSystemDatabase db ;
Database_F()
: db( L"test-installer-lib.msi" )
@@ -25,12 +25,12 @@
TEST_F( Database_F, view_n_columns_and_n_rows )
{
View v( db, L"SELECT * FROM AbpUIText" ) ;
- Record r( v.first() ) ;
+ Record r( v.First() ) ;
unsigned int j ;
- for ( j = 0 ; r != v.end() ; ++ j )
+ for ( j = 0 ; r != v.End() ; ++ j )
{
- ASSERT_EQ( 3, r.n_fields() ) ;
- r = v.next() ;
+ ASSERT_EQ( 3, r.NumberOfFields() ) ;
+ r = v.Next() ;
}
ASSERT_EQ( 4, j ) ;
}
@@ -38,29 +38,29 @@
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.n_fields() ) ;
- std::wstring s( r.value_string( 1 ) ) ;
+ 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 ) ;
+ r = v.Next() ;
+ ASSERT_EQ( v.End(), r ) ;
}
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.assign_string( 1, L"dialog_unknown" ) ;
- Record r( v.first( arg ) ) ;
- ASSERT_EQ( 1, r.n_fields() ) ;
- std::wstring s( r.value_string( 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 ) ;
+ r = v.Next() ;
+ ASSERT_EQ( v.End(), r ) ;
}
« no previous file with comments | « installer/src/installer-lib/session.cpp ('k') | installer/src/installer-lib/test/exception_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld