[wix-devs] Burn unit tests

Hoover, Jacob Jacob.Hoover at greenheck.com
Wed Apr 28 12:41:31 PDT 2021


Are the current unit test expected to be functional?

RelatedBundleMissingFromCacheTest


DetectUpgradeBundle

            hr = PseudoBundleInitialize(0, &pRelatedBundle->package, TRUE, wzId, pRelatedBundle->relationType, BOOTSTRAPPER_PACKAGE_STATE_PRESENT, TRUE, NULL, NULL, NULL, 0, FALSE, L"-quiet", L"-repair -quiet", L"-uninstall -quiet", &dependencyProvider, NULL, 0);
            NativeAssert::Succeeded(hr, "Failed to initialize related bundle to represent bundle: %ls", wzId);

(The 2 NULL's here: BOOTSTRAPPER_PACKAGE_STATE_PRESENT, TRUE, NULL, NULL)


In Psuedo...
    hr = StrAllocString(&pPayload->sczFilePath, wzFilePath, 0);
    ExitOnFailure(hr, "Failed to copy filename for pseudo bundle.");

    hr = StrAllocString(&pPayload->sczSourcePath, wzLocalSource, 0);
    ExitOnFailure(hr, "Failed to copy local source path for pseudo bundle.");

Calls

AllocStringHelper

static HRESULT AllocStringHelper(
    __deref_out_ecount_z(cchSource + 1) LPWSTR* ppwz,
    __in_z LPCWSTR wzSource,
    __in SIZE_T cchSource,
    __in BOOL fZeroOnRealloc
    )
{
    Assert(ppwz && wzSource);


Thanks,
Jacob



More information about the wix-devs mailing list