diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2019-12-22 13:51:35 +1100 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2019-12-22 13:34:07 +1000 |
commit | 4a176b759c47fa1970fcfd0d9e25c294bda82ef4 (patch) | |
tree | 961cc91c44569d72c12d9f2dc5b1c11a80bb94a9 /src/test/examples/TestEngine/ExampleTestEngine.cpp | |
parent | 43fb611edc680a74d229e8f1eeacb30adad8e3c7 (diff) | |
download | wix-4a176b759c47fa1970fcfd0d9e25c294bda82ef4.tar.gz wix-4a176b759c47fa1970fcfd0d9e25c294bda82ef4.tar.bz2 wix-4a176b759c47fa1970fcfd0d9e25c294bda82ef4.zip |
Update the MbaHost test project to use an external exe to load the BA, which allows loading a different .NET than the one running the tests. This also allows writing the tests in C# instead of C++/CLI.
Diffstat (limited to 'src/test/examples/TestEngine/ExampleTestEngine.cpp')
-rw-r--r-- | src/test/examples/TestEngine/ExampleTestEngine.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/examples/TestEngine/ExampleTestEngine.cpp b/src/test/examples/TestEngine/ExampleTestEngine.cpp new file mode 100644 index 00000000..9f051875 --- /dev/null +++ b/src/test/examples/TestEngine/ExampleTestEngine.cpp | |||
@@ -0,0 +1,22 @@ | |||
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 | |||
5 | int __cdecl wmain(int argc, LPWSTR argv[]) | ||
6 | { | ||
7 | HRESULT hr = E_INVALIDARG; | ||
8 | |||
9 | ConsoleInitialize(); | ||
10 | |||
11 | if (argc != 2) | ||
12 | { | ||
13 | ConsoleWriteError(hr, CONSOLE_COLOR_RED, "Usage: Example.TestEngine.exe BA.dll"); | ||
14 | } | ||
15 | else | ||
16 | { | ||
17 | hr = RunShutdownEngine(argv[1]); | ||
18 | } | ||
19 | |||
20 | ConsoleUninitialize(); | ||
21 | return HRESULT_CODE(hr); | ||
22 | } | ||