diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-08-03 15:41:18 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-08-04 10:03:57 -0500 |
commit | 6d7a275edafb3ae0f3cff94d66503a82dafb71f7 (patch) | |
tree | fae8f75e2cd1d7b179b0ed93e15625d68ba7c441 /src/burn/test/BurnUnitTest/CacheTest.cpp | |
parent | ed57d171f6fb6bb4e180696cc12caa568599566a (diff) | |
download | wix-6d7a275edafb3ae0f3cff94d66503a82dafb71f7.tar.gz wix-6d7a275edafb3ae0f3cff94d66503a82dafb71f7.tar.bz2 wix-6d7a275edafb3ae0f3cff94d66503a82dafb71f7.zip |
Replace static cache internals with a struct.
Initialize them explicitly to make it clearer when that happens.
Diffstat (limited to 'src/burn/test/BurnUnitTest/CacheTest.cpp')
-rw-r--r-- | src/burn/test/BurnUnitTest/CacheTest.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/burn/test/BurnUnitTest/CacheTest.cpp b/src/burn/test/BurnUnitTest/CacheTest.cpp index e9ad555b..6979ec1a 100644 --- a/src/burn/test/BurnUnitTest/CacheTest.cpp +++ b/src/burn/test/BurnUnitTest/CacheTest.cpp | |||
@@ -48,6 +48,8 @@ namespace Bootstrapper | |||
48 | void CacheSignatureTest() | 48 | void CacheSignatureTest() |
49 | { | 49 | { |
50 | HRESULT hr = S_OK; | 50 | HRESULT hr = S_OK; |
51 | BURN_CACHE cache = { }; | ||
52 | BURN_ENGINE_COMMAND internalCommand = { }; | ||
51 | BURN_PACKAGE package = { }; | 53 | BURN_PACKAGE package = { }; |
52 | BURN_PAYLOAD payload = { }; | 54 | BURN_PAYLOAD payload = { }; |
53 | LPWSTR sczPayloadPath = NULL; | 55 | LPWSTR sczPayloadPath = NULL; |
@@ -74,7 +76,10 @@ namespace Bootstrapper | |||
74 | payload.qwFileSize = 27; | 76 | payload.qwFileSize = 27; |
75 | payload.verification = BURN_PAYLOAD_VERIFICATION_HASH; | 77 | payload.verification = BURN_PAYLOAD_VERIFICATION_HASH; |
76 | 78 | ||
77 | hr = CacheCompletePayload(package.fPerMachine, &payload, package.sczCacheId, sczPayloadPath, FALSE, CacheTestEventRoutine, CacheTestProgressRoutine, &context); | 79 | hr = CacheInitialize(&cache, &internalCommand); |
80 | TestThrowOnFailure(hr, L"Failed initialize cache."); | ||
81 | |||
82 | hr = CacheCompletePayload(&cache, package.fPerMachine, &payload, package.sczCacheId, sczPayloadPath, FALSE, CacheTestEventRoutine, CacheTestProgressRoutine, &context); | ||
78 | Assert::Equal(S_OK, hr); | 83 | Assert::Equal(S_OK, hr); |
79 | } | 84 | } |
80 | finally | 85 | finally |