summaryrefslogtreecommitdiff
path: root/src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-05-26 17:33:15 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-05-31 13:20:44 -0500
commitfb4f8c7108f43d2341ba299424646c4963b21188 (patch)
tree7f3c907ac5406d2000056f6bcca41d7ae4d3a925 /src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h
parent0f9931107ecf9e1f6714e6fd2cabc76d2ddb1153 (diff)
downloadwix-fb4f8c7108f43d2341ba299424646c4963b21188.tar.gz
wix-fb4f8c7108f43d2341ba299424646c4963b21188.tar.bz2
wix-fb4f8c7108f43d2341ba299424646c4963b21188.zip
Replace PathIsAbsolute with PathIsRooted and add PathIsFullyQualified.
Diffstat (limited to 'src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h')
-rw-r--r--src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h b/src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h
index 62ace4a9..b0206b14 100644
--- a/src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h
+++ b/src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h
@@ -64,6 +64,27 @@ namespace TestSupport {
64 WixAssert::Succeeded(hr, gcnew String(zFormat), formatArgs); 64 WixAssert::Succeeded(hr, gcnew String(zFormat), formatArgs);
65 } 65 }
66 66
67 static void SpecificReturnCode(HRESULT hrExpected, HRESULT hr, LPCSTR zFormat, LPCSTR zArg, ... array<LPCSTR>^ zArgs)
68 {
69 array<Object^>^ formatArgs = gcnew array<Object^, 1>(zArgs->Length + 1);
70 formatArgs[0] = NativeAssert::LPSTRToString(zArg);
71 for (int i = 0; i < zArgs->Length; ++i)
72 {
73 formatArgs[i + 1] = NativeAssert::LPSTRToString(zArgs[i]);
74 }
75 WixAssert::SpecificReturnCode(hrExpected, hr, gcnew String(zFormat), formatArgs);
76 }
77
78 static void SpecificReturnCode(HRESULT hrExpected, HRESULT hr, LPCSTR zFormat, ... array<LPCWSTR>^ wzArgs)
79 {
80 array<Object^>^ formatArgs = gcnew array<Object^, 1>(wzArgs->Length);
81 for (int i = 0; i < wzArgs->Length; ++i)
82 {
83 formatArgs[i] = NativeAssert::LPWSTRToString(wzArgs[i]);
84 }
85 WixAssert::SpecificReturnCode(hrExpected, hr, gcnew String(zFormat), formatArgs);
86 }
87
67 static void ValidReturnCode(HRESULT hr, ... array<HRESULT>^ validReturnCodes) 88 static void ValidReturnCode(HRESULT hr, ... array<HRESULT>^ validReturnCodes)
68 { 89 {
69 Assert::Contains(hr, (IEnumerable<HRESULT>^)validReturnCodes); 90 Assert::Contains(hr, (IEnumerable<HRESULT>^)validReturnCodes);