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

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

Issue 6202981292703744: Whole installer (Closed)
Patch Set: Created June 24, 2014, 7:27 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 * That session class, though, isn't written yet.
13 */
14 /*
15 * DISABLED. Refactor into proper tests.
16 */
17 if ( false )
18 {
19 // This variable was the argument to the entry point.
20 MSIHANDLE session_handle = 0;
21
22 // The code in the body.
23 Immediate_Session session( session_handle, "abp_close_ie" ) ;
24 session.log( L"Have session object" ) ;
25 Installation_Database db( session ) ;
26 session.log( L"Have database object" ) ;
27
28 // Test: ensure that a property is present with its expected value. Exercise s the conversion operator to String.
29 session.log( L"VersionMsi = " + Property( session, L"VersionMsi" ) ) ;
30
31 // Test: create a property dynamically from within the CA. Not sure if this can be done offline.
32 Property tv( session, L"TESTVARIABLE" ) ;
33 session.log( L"TESTVARIABLE = " + tv ) ;
34
35 // Test: assign a new value to a property.
36 session.log( L"Setting TESTVARIABLE to 'testvalue'" ) ;
37 tv = L"testvalue" ;
38 session.log( L"TESTVARIABLE = " + tv ) ;
39 }
40 }
OLDNEW

Powered by Google App Engine
This is Rietveld