aboutsummaryrefslogtreecommitdiff
path: root/src/test/BalUtilUnitTest/TestBAFunctions.cpp
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-12-02 20:11:21 -0600
committerSean Hall <r.sean.hall@gmail.com>2020-12-03 10:58:32 -0600
commit27766738dc62ec95f89af347eebb1723a5943848 (patch)
treea113cf0cf3872fbbd752999fb8868ffce39e6f55 /src/test/BalUtilUnitTest/TestBAFunctions.cpp
parente08c0fc700edd3fe31d3a3778c26cac9f0304de4 (diff)
downloadwix-27766738dc62ec95f89af347eebb1723a5943848.tar.gz
wix-27766738dc62ec95f89af347eebb1723a5943848.tar.bz2
wix-27766738dc62ec95f89af347eebb1723a5943848.zip
Add test projects for balutil and bextutil.
For now, they only have test implementations to check for compile errors in header only code.
Diffstat (limited to 'src/test/BalUtilUnitTest/TestBAFunctions.cpp')
-rw-r--r--src/test/BalUtilUnitTest/TestBAFunctions.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/test/BalUtilUnitTest/TestBAFunctions.cpp b/src/test/BalUtilUnitTest/TestBAFunctions.cpp
new file mode 100644
index 00000000..927a8d10
--- /dev/null
+++ b/src/test/BalUtilUnitTest/TestBAFunctions.cpp
@@ -0,0 +1,41 @@
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 __in IBootstrapperEngine* pEngine,
13 __in const BA_FUNCTIONS_CREATE_ARGS* pArgs
14 ) : CBalBaseBAFunctions(hModule, pEngine, pArgs)
15 {
16 }
17};
18
19HRESULT CreateBAFunctions(
20 __in HMODULE hModule,
21 __in IBootstrapperEngine* pEngine,
22 __in const BA_FUNCTIONS_CREATE_ARGS* pArgs,
23 __in BA_FUNCTIONS_CREATE_RESULTS* pResults,
24 __out IBAFunctions** ppApplication
25 )
26{
27 HRESULT hr = S_OK;
28 CTestBAFunctions* pApplication = NULL;
29
30 pApplication = new CTestBAFunctions(hModule, pEngine, pArgs);
31 ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new test bafunctions object.");
32
33 pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc;
34 pResults->pvBAFunctionsProcContext = pApplication;
35 *ppApplication = pApplication;
36 pApplication = NULL;
37
38LExit:
39 ReleaseObject(pApplication);
40 return hr;
41}