aboutsummaryrefslogtreecommitdiff
path: root/src/api/burn/test/BalUtilUnitTest
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2024-03-07 01:44:51 -0800
committerRob Mensching <rob@firegiant.com>2024-03-07 10:55:57 -0800
commitdea25ba9bcfd65200b60339c2e4bc060cdf20723 (patch)
tree91dae5127a7eeb4f0e59252194fc7ec7153a2781 /src/api/burn/test/BalUtilUnitTest
parent3d2d46f62fc01e2653d0251ad9703090574e7c41 (diff)
downloadwix-dea25ba9bcfd65200b60339c2e4bc060cdf20723.tar.gz
wix-dea25ba9bcfd65200b60339c2e4bc060cdf20723.tar.bz2
wix-dea25ba9bcfd65200b60339c2e4bc060cdf20723.zip
Move wixstdba functions to Bal.wixext build
Diffstat (limited to 'src/api/burn/test/BalUtilUnitTest')
-rw-r--r--src/api/burn/test/BalUtilUnitTest/BAFunctionsTests.cpp47
-rw-r--r--src/api/burn/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj3
-rw-r--r--src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp39
-rw-r--r--src/api/burn/test/BalUtilUnitTest/TestBAFunctions.h8
-rw-r--r--src/api/burn/test/BalUtilUnitTest/precomp.h2
5 files changed, 0 insertions, 99 deletions
diff --git a/src/api/burn/test/BalUtilUnitTest/BAFunctionsTests.cpp b/src/api/burn/test/BalUtilUnitTest/BAFunctionsTests.cpp
deleted file mode 100644
index ba04c1bb..00000000
--- a/src/api/burn/test/BalUtilUnitTest/BAFunctionsTests.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3#include "precomp.h"
4
5using namespace System;
6using namespace Xunit;
7using namespace WixInternal::TestSupport;
8using namespace WixInternal::TestSupport::XunitExtensions;
9
10namespace BalUtilTests
11{
12 public ref class BAFunctions
13 {
14 public:
15 [Fact(Skip = "Need a mock implementation of IBootstrapperEngine to test BAFunctions.")]
16 void CanCreateTestBAFunctions()
17 {
18 HRESULT hr = S_OK;
19 BA_FUNCTIONS_CREATE_ARGS args = { };
20 BA_FUNCTIONS_CREATE_RESULTS results = { };
21 IBootstrapperEngine* pEngine = NULL;
22 BOOTSTRAPPER_COMMAND command = { };
23 IBAFunctions* pBAFunctions = NULL;
24
25 args.cbSize = sizeof(args);
26 args.pEngine = pEngine;
27 args.pCommand = &command;
28
29 results.cbSize = sizeof(results);
30
31 try
32 {
33 BalInitialize(pEngine);
34
35 hr = CreateBAFunctions(NULL, &args, &results);
36 NativeAssert::Succeeded(hr, "Failed to create BAFunctions.");
37
38 pBAFunctions = reinterpret_cast<IBAFunctions*>(results.pvBAFunctionsProcContext);
39 }
40 finally
41 {
42 ReleaseObject(pEngine);
43 ReleaseObject(pBAFunctions);
44 }
45 }
46 };
47}
diff --git a/src/api/burn/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj b/src/api/burn/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj
index de79fe33..114ab26d 100644
--- a/src/api/burn/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj
+++ b/src/api/burn/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj
@@ -37,20 +37,17 @@
37 </PropertyGroup> 37 </PropertyGroup>
38 38
39 <ItemGroup> 39 <ItemGroup>
40 <ClCompile Include="BAFunctionsTests.cpp" />
41 <ClCompile Include="BootstrapperApplicationTests.cpp" /> 40 <ClCompile Include="BootstrapperApplicationTests.cpp" />
42 <ClCompile Include="precomp.cpp"> 41 <ClCompile Include="precomp.cpp">
43 <PrecompiledHeader>Create</PrecompiledHeader> 42 <PrecompiledHeader>Create</PrecompiledHeader>
44 <!-- Warnings from referencing netstandard dlls --> 43 <!-- Warnings from referencing netstandard dlls -->
45 <DisableSpecificWarnings>4564;4691</DisableSpecificWarnings> 44 <DisableSpecificWarnings>4564;4691</DisableSpecificWarnings>
46 </ClCompile> 45 </ClCompile>
47 <ClCompile Include="TestBAFunctions.cpp" />
48 <ClCompile Include="TestBootstrapperApplication.cpp" /> 46 <ClCompile Include="TestBootstrapperApplication.cpp" />
49 </ItemGroup> 47 </ItemGroup>
50 48
51 <ItemGroup> 49 <ItemGroup>
52 <ClInclude Include="precomp.h" /> 50 <ClInclude Include="precomp.h" />
53 <ClInclude Include="TestBAFunctions.h" />
54 <ClInclude Include="TestBootstrapperApplication.h" /> 51 <ClInclude Include="TestBootstrapperApplication.h" />
55 </ItemGroup> 52 </ItemGroup>
56 53
diff --git a/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp b/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp
deleted file mode 100644
index 3e850442..00000000
--- a/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3#include "precomp.h"
4#include "BalBaseBAFunctions.h"
5#include "BalBaseBAFunctionsProc.h"
6
7class CTestBAFunctions : public CBalBaseBAFunctions
8{
9public:
10 CTestBAFunctions(
11 __in HMODULE hModule
12 ) : CBalBaseBAFunctions(hModule)
13 {
14 }
15};
16
17HRESULT CreateBAFunctions(
18 __in HMODULE hModule,
19 __in const BA_FUNCTIONS_CREATE_ARGS* pArgs,
20 __inout BA_FUNCTIONS_CREATE_RESULTS* pResults
21 )
22{
23 HRESULT hr = S_OK;
24 CTestBAFunctions* pFunction = NULL;
25
26 pFunction = new CTestBAFunctions(hModule);
27 ExitOnNull(pFunction, hr, E_OUTOFMEMORY, "Failed to create new test bafunctions object.");
28
29 hr = pFunction->OnCreate(pArgs->pEngine, pArgs->pCommand);
30 ExitOnFailure(hr, "Failed to initialize new test bafunctions.");
31
32 pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc;
33 pResults->pvBAFunctionsProcContext = pFunction;
34 pFunction = NULL;
35
36LExit:
37 ReleaseObject(pFunction);
38 return hr;
39}
diff --git a/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.h b/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.h
deleted file mode 100644
index e25e40c3..00000000
--- a/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#pragma once
2// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3
4HRESULT CreateBAFunctions(
5 __in HMODULE hModule,
6 __in const BA_FUNCTIONS_CREATE_ARGS* pArgs,
7 __inout BA_FUNCTIONS_CREATE_RESULTS* pResults
8 );
diff --git a/src/api/burn/test/BalUtilUnitTest/precomp.h b/src/api/burn/test/BalUtilUnitTest/precomp.h
index 4cdd262c..78add593 100644
--- a/src/api/burn/test/BalUtilUnitTest/precomp.h
+++ b/src/api/burn/test/BalUtilUnitTest/precomp.h
@@ -16,11 +16,9 @@
16#include <dictutil.h> 16#include <dictutil.h>
17 17
18#include <IBootstrapperApplication.h> 18#include <IBootstrapperApplication.h>
19#include <IBAFunctions.h>
20#include <balutil.h> 19#include <balutil.h>
21#include <balretry.h> 20#include <balretry.h>
22 21
23#include "TestBAFunctions.h"
24#include "TestBootstrapperApplication.h" 22#include "TestBootstrapperApplication.h"
25 23
26#pragma managed 24#pragma managed