From c843b47d6233153fa961c6d0e61edf7cedf255bb Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 8 Nov 2022 14:58:05 -0800 Subject: Separate WixInternal content from official WixToolset namespace --- .../AssemblyInfo.cpp | 17 ---- .../NativeAssert.h | 104 --------------------- .../WixBuildTools.TestSupport.Native.vcxproj | 74 --------------- ...ixBuildTools.TestSupport.Native.vcxproj.filters | 33 ------- .../build/WixBuildTools.TestSupport.Native.props | 13 --- .../build/WixBuildTools.TestSupport.Native.targets | 54 ----------- .../packages.config | 17 ---- .../WixBuildTools.TestSupport.Native/precomp.cpp | 3 - .../WixBuildTools.TestSupport.Native/precomp.h | 11 --- 9 files changed, 326 deletions(-) delete mode 100644 src/internal/WixBuildTools.TestSupport.Native/AssemblyInfo.cpp delete mode 100644 src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h delete mode 100644 src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.vcxproj delete mode 100644 src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.vcxproj.filters delete mode 100644 src/internal/WixBuildTools.TestSupport.Native/build/WixBuildTools.TestSupport.Native.props delete mode 100644 src/internal/WixBuildTools.TestSupport.Native/build/WixBuildTools.TestSupport.Native.targets delete mode 100644 src/internal/WixBuildTools.TestSupport.Native/packages.config delete mode 100644 src/internal/WixBuildTools.TestSupport.Native/precomp.cpp delete mode 100644 src/internal/WixBuildTools.TestSupport.Native/precomp.h (limited to 'src/internal/WixBuildTools.TestSupport.Native') diff --git a/src/internal/WixBuildTools.TestSupport.Native/AssemblyInfo.cpp b/src/internal/WixBuildTools.TestSupport.Native/AssemblyInfo.cpp deleted file mode 100644 index 23a48993..00000000 --- a/src/internal/WixBuildTools.TestSupport.Native/AssemblyInfo.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// 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. - -#include "precomp.h" - -using namespace System::Reflection; -using namespace System::Runtime::CompilerServices; -using namespace System::Runtime::InteropServices; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitleAttribute("WixBuildTools.TestSupport.Native")]; -[assembly: AssemblyDescriptionAttribute("")]; -[assembly: AssemblyCultureAttribute("")]; -[assembly: ComVisible(false)]; diff --git a/src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h b/src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h deleted file mode 100644 index b0206b14..00000000 --- a/src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h +++ /dev/null @@ -1,104 +0,0 @@ -#pragma once -// 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. - - -namespace WixBuildTools { -namespace TestSupport { - - using namespace System; - using namespace System::Collections::Generic; - using namespace System::Linq; - using namespace Xunit; - - public ref class NativeAssert : WixAssert - { - public: - static void NotNull(LPCWSTR wz) - { - if (!wz) - { - Assert::NotNull(nullptr); - } - } - - // For some reason, naming these NotStringEqual methods "NotEqual" breaks Intellisense in files that call any overload of the NotEqual method. - static void NotStringEqual(LPCWSTR expected, LPCWSTR actual) - { - NativeAssert::NotStringEqual(expected, actual, FALSE); - } - - static void NotStringEqual(LPCWSTR expected, LPCWSTR actual, BOOL ignoreCase) - { - WixAssert::NotStringEqual(NativeAssert::LPWSTRToString(expected), NativeAssert::LPWSTRToString(actual), ignoreCase); - } - - // For some reason, naming these StringEqual methods "Equal" breaks Intellisense in files that call any overload of the Equal method. - static void StringEqual(LPCWSTR expected, LPCWSTR actual) - { - NativeAssert::StringEqual(expected, actual, FALSE); - } - - static void StringEqual(LPCWSTR expected, LPCWSTR actual, BOOL ignoreCase) - { - WixAssert::StringEqual(NativeAssert::LPWSTRToString(expected), NativeAssert::LPWSTRToString(actual), ignoreCase); - } - - static void Succeeded(HRESULT hr, LPCSTR zFormat, LPCSTR zArg, ... array^ zArgs) - { - array^ formatArgs = gcnew array(zArgs->Length + 1); - formatArgs[0] = NativeAssert::LPSTRToString(zArg); - for (int i = 0; i < zArgs->Length; ++i) - { - formatArgs[i + 1] = NativeAssert::LPSTRToString(zArgs[i]); - } - WixAssert::Succeeded(hr, gcnew String(zFormat), formatArgs); - } - - static void Succeeded(HRESULT hr, LPCSTR zFormat, ... array^ wzArgs) - { - array^ formatArgs = gcnew array(wzArgs->Length); - for (int i = 0; i < wzArgs->Length; ++i) - { - formatArgs[i] = NativeAssert::LPWSTRToString(wzArgs[i]); - } - WixAssert::Succeeded(hr, gcnew String(zFormat), formatArgs); - } - - static void SpecificReturnCode(HRESULT hrExpected, HRESULT hr, LPCSTR zFormat, LPCSTR zArg, ... array^ zArgs) - { - array^ formatArgs = gcnew array(zArgs->Length + 1); - formatArgs[0] = NativeAssert::LPSTRToString(zArg); - for (int i = 0; i < zArgs->Length; ++i) - { - formatArgs[i + 1] = NativeAssert::LPSTRToString(zArgs[i]); - } - WixAssert::SpecificReturnCode(hrExpected, hr, gcnew String(zFormat), formatArgs); - } - - static void SpecificReturnCode(HRESULT hrExpected, HRESULT hr, LPCSTR zFormat, ... array^ wzArgs) - { - array^ formatArgs = gcnew array(wzArgs->Length); - for (int i = 0; i < wzArgs->Length; ++i) - { - formatArgs[i] = NativeAssert::LPWSTRToString(wzArgs[i]); - } - WixAssert::SpecificReturnCode(hrExpected, hr, gcnew String(zFormat), formatArgs); - } - - static void ValidReturnCode(HRESULT hr, ... array^ validReturnCodes) - { - Assert::Contains(hr, (IEnumerable^)validReturnCodes); - } - - private: - static String^ LPSTRToString(LPCSTR z) - { - return z ? gcnew String(z) : nullptr; - } - static String^ LPWSTRToString(LPCWSTR wz) - { - return wz ? gcnew String(wz) : nullptr; - } - }; -} -} diff --git a/src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.vcxproj b/src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.vcxproj deleted file mode 100644 index 47d79745..00000000 --- a/src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.vcxproj +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942} - {95BABD97-FBDB-453A-AF8A-FA031A07B599} - WixBuildTools::TestSupport - ManagedCProj - DynamicLibrary - Unicode - true - WixBuildTools C++/CLI Test Support - false - true - - - - - - - - - - - - - - Create - - 4564;4691 - - - - - - - - - - - - - - - {6C57EF2C-979A-4106-A9E5-FE342810619A} - - - - - - - diff --git a/src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.vcxproj.filters b/src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.vcxproj.filters deleted file mode 100644 index 34c1380f..00000000 --- a/src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.vcxproj.filters +++ /dev/null @@ -1,33 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/src/internal/WixBuildTools.TestSupport.Native/build/WixBuildTools.TestSupport.Native.props b/src/internal/WixBuildTools.TestSupport.Native/build/WixBuildTools.TestSupport.Native.props deleted file mode 100644 index d9d9dab4..00000000 --- a/src/internal/WixBuildTools.TestSupport.Native/build/WixBuildTools.TestSupport.Native.props +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), .gitignore)) - - - - - v4.7.2 - - diff --git a/src/internal/WixBuildTools.TestSupport.Native/build/WixBuildTools.TestSupport.Native.targets b/src/internal/WixBuildTools.TestSupport.Native/build/WixBuildTools.TestSupport.Native.targets deleted file mode 100644 index 3d28ed57..00000000 --- a/src/internal/WixBuildTools.TestSupport.Native/build/WixBuildTools.TestSupport.Native.targets +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - $(RootBuildFolder)internal\$(Configuration)\$(PlatformTarget)\WixBuildTools.TestSupport.dll - - - $(RootBuildFolder)internal\$(Configuration)\$(PlatformTarget)\WixBuildTools.TestSupport.Native.dll - - - - - - $(RootPackagesFolder)xunit.abstractions.2.0.3\lib\netstandard2.0\xunit.abstractions.dll - - - $(RootPackagesFolder)xunit.assert.2.4.2\lib\netstandard1.1\xunit.assert.dll - - - $(RootPackagesFolder)xunit.extensibility.core.2.4.2\lib\netstandard1.1\xunit.core.dll - - - $(RootPackagesFolder)xunit.extensibility.execution.2.4.2\lib\net452\xunit.execution.desktop.dll - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - - - - - diff --git a/src/internal/WixBuildTools.TestSupport.Native/packages.config b/src/internal/WixBuildTools.TestSupport.Native/packages.config deleted file mode 100644 index 060bff6b..00000000 --- a/src/internal/WixBuildTools.TestSupport.Native/packages.config +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/internal/WixBuildTools.TestSupport.Native/precomp.cpp b/src/internal/WixBuildTools.TestSupport.Native/precomp.cpp deleted file mode 100644 index 37664a1c..00000000 --- a/src/internal/WixBuildTools.TestSupport.Native/precomp.cpp +++ /dev/null @@ -1,3 +0,0 @@ -// 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. - -#include "precomp.h" diff --git a/src/internal/WixBuildTools.TestSupport.Native/precomp.h b/src/internal/WixBuildTools.TestSupport.Native/precomp.h deleted file mode 100644 index f54b55be..00000000 --- a/src/internal/WixBuildTools.TestSupport.Native/precomp.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once -// 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. - - -#include -#include - -#include "NativeAssert.h" - -#pragma managed -#include -- cgit v1.2.3-55-g6feb