aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-02-01 20:36:39 -0600
committerSean Hall <r.sean.hall@gmail.com>2021-02-04 22:16:10 -0600
commitcc5fe7c79aad14819df1b4cb134884b80a945141 (patch)
tree4b0ab44744a6b989f784292d438ef0654d9b03ac /src/test
parentcede270b2bd3da6bd8d5205b8834e786c8d6c1ce (diff)
downloadwix-cc5fe7c79aad14819df1b4cb134884b80a945141.tar.gz
wix-cc5fe7c79aad14819df1b4cb134884b80a945141.tar.bz2
wix-cc5fe7c79aad14819df1b4cb134884b80a945141.zip
Move registry checks for dependency ref-counting into Detect.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/BurnUnitTest/PlanTest.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/test/BurnUnitTest/PlanTest.cpp b/src/test/BurnUnitTest/PlanTest.cpp
index 71e455c3..fb4ca246 100644
--- a/src/test/BurnUnitTest/PlanTest.cpp
+++ b/src/test/BurnUnitTest/PlanTest.cpp
@@ -552,9 +552,23 @@ namespace Bootstrapper
552 ReleaseStr(sczFilePath); 552 ReleaseStr(sczFilePath);
553 } 553 }
554 554
555 DependencyInitialize(&pEngineState->registration, NULL);
556
555 pEngineState->userExperience.pfnBAProc = PlanTestBAProc; 557 pEngineState->userExperience.pfnBAProc = PlanTestBAProc;
556 } 558 }
557 559
560 void PlanTestDetect(BURN_ENGINE_STATE* pEngineState)
561 {
562 HRESULT hr = S_OK;
563 BURN_REGISTRATION* pRegistration = &pEngineState->registration;
564
565 DetectReset(pRegistration, &pEngineState->packages);
566 PlanReset(&pEngineState->plan, &pEngineState->packages);
567
568 hr = DepDependencyArrayAlloc(&pRegistration->rgIgnoredDependencies, &pRegistration->cIgnoredDependencies, pRegistration->sczProviderKey, NULL);
569 NativeAssert::Succeeded(hr, "Failed to add the bundle provider key to the list of dependencies to ignore.");
570 }
571
558 void DetectAttachedContainerAsAttached(BURN_ENGINE_STATE* pEngineState) 572 void DetectAttachedContainerAsAttached(BURN_ENGINE_STATE* pEngineState)
559 { 573 {
560 for (DWORD i = 0; i < pEngineState->containers.cContainers; ++i) 574 for (DWORD i = 0; i < pEngineState->containers.cContainers; ++i)
@@ -585,8 +599,7 @@ namespace Bootstrapper
585 599
586 void DetectPackagesAsAbsent(BURN_ENGINE_STATE* pEngineState) 600 void DetectPackagesAsAbsent(BURN_ENGINE_STATE* pEngineState)
587 { 601 {
588 DetectReset(&pEngineState->registration, &pEngineState->packages); 602 PlanTestDetect(pEngineState);
589 PlanReset(&pEngineState->plan, &pEngineState->packages);
590 603
591 for (DWORD i = 0; i < pEngineState->packages.cPackages; ++i) 604 for (DWORD i = 0; i < pEngineState->packages.cPackages; ++i)
592 { 605 {
@@ -597,8 +610,7 @@ namespace Bootstrapper
597 610
598 void DetectPackagesAsPresentAndCached(BURN_ENGINE_STATE* pEngineState) 611 void DetectPackagesAsPresentAndCached(BURN_ENGINE_STATE* pEngineState)
599 { 612 {
600 DetectReset(&pEngineState->registration, &pEngineState->packages); 613 PlanTestDetect(pEngineState);
601 PlanReset(&pEngineState->plan, &pEngineState->packages);
602 614
603 pEngineState->registration.fInstalled = TRUE; 615 pEngineState->registration.fInstalled = TRUE;
604 616
@@ -611,8 +623,7 @@ namespace Bootstrapper
611 623
612 void DetectPermanentPackagesAsPresentAndCached(BURN_ENGINE_STATE* pEngineState) 624 void DetectPermanentPackagesAsPresentAndCached(BURN_ENGINE_STATE* pEngineState)
613 { 625 {
614 DetectReset(&pEngineState->registration, &pEngineState->packages); 626 PlanTestDetect(pEngineState);
615 PlanReset(&pEngineState->plan, &pEngineState->packages);
616 627
617 pEngineState->registration.fInstalled = TRUE; 628 pEngineState->registration.fInstalled = TRUE;
618 629