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

Side by Side Diff: installer/src/installer-lib/test/property_test.cpp

Issue 5675960980471808: Updated installer with custom action (Closed)
Patch Set: Created March 8, 2014, 5:06 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #include <gtest/gtest.h>
2
3 #include "../database.h"
4 #include "../property.h"
5
6 TEST( Property_Test, null )
7 {
8 /*
9 * This is an extract of manual test code originally run from abp_close_ie DLL entry point.
10 * This code relies on an MSI database opened for installation, which we don't need to access properties.
11 * We can instead use an offline session, with the database opened outside Win dows Installer.
12 */
13 /*
14 * DISABLED. Refactor into proper tests.
15 */
16 if ( false )
17 {
18 // This variable was the argument to the entry point.
19 MSIHANDLE session_handle = 0;
20
21 // The code in the body.
22 Immediate_Session session( session_handle, "abp_close_ie" ) ;
23 session.log( L"Have session object" ) ;
24 Installation_Database db( session ) ;
25 session.log( L"Have database object" ) ;
26
27 // Test: ensure that a property is present with its expected value. Exercise s the conversion operator to String.
28 session.log( L"VersionMsi = " + Property( session, L"VersionMsi" ) ) ;
29
30 // Test: create a property dynamically from within the CA. Not sure if this can be done offline.
31 Property tv( session, L"TESTVARIABLE" ) ;
32 session.log( L"TESTVARIABLE = " + tv ) ;
33
34 // Test: assign a new value to a property.
35 session.log( L"Setting TESTVARIABLE to 'testvalue'" ) ;
36 tv = L"testvalue" ;
37 session.log( L"TESTVARIABLE = " + tv ) ;
38 }
39 }
OLDNEW

Powered by Google App Engine
This is Rietveld