diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-12-31 18:20:50 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-01-01 10:24:08 -0600 |
commit | 95b1be66d4c16b1b05b761c1771df229ac0e539c (patch) | |
tree | 7ea6a46cd25ea83c41d0a7ba66df177925d95f44 /src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h | |
parent | 5be795c6bcbc03bc37f7cf7c758298ccfaa884ca (diff) | |
download | wix-95b1be66d4c16b1b05b761c1771df229ac0e539c.tar.gz wix-95b1be66d4c16b1b05b761c1771df229ac0e539c.tar.bz2 wix-95b1be66d4c16b1b05b761c1771df229ac0e539c.zip |
Try to get more helpful test failure messages.
Diffstat (limited to 'src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h')
-rw-r--r-- | src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h b/src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h index 34af4f34..62ace4a9 100644 --- a/src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h +++ b/src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h | |||
@@ -29,8 +29,7 @@ namespace TestSupport { | |||
29 | 29 | ||
30 | static void NotStringEqual(LPCWSTR expected, LPCWSTR actual, BOOL ignoreCase) | 30 | static void NotStringEqual(LPCWSTR expected, LPCWSTR actual, BOOL ignoreCase) |
31 | { | 31 | { |
32 | IEqualityComparer<String^>^ comparer = ignoreCase ? StringComparer::InvariantCultureIgnoreCase : StringComparer::InvariantCulture; | 32 | WixAssert::NotStringEqual(NativeAssert::LPWSTRToString(expected), NativeAssert::LPWSTRToString(actual), ignoreCase); |
33 | Assert::NotEqual(NativeAssert::LPWSTRToString(expected), NativeAssert::LPWSTRToString(actual), comparer); | ||
34 | } | 33 | } |
35 | 34 | ||
36 | // For some reason, naming these StringEqual methods "Equal" breaks Intellisense in files that call any overload of the Equal method. | 35 | // For some reason, naming these StringEqual methods "Equal" breaks Intellisense in files that call any overload of the Equal method. |
@@ -41,8 +40,7 @@ namespace TestSupport { | |||
41 | 40 | ||
42 | static void StringEqual(LPCWSTR expected, LPCWSTR actual, BOOL ignoreCase) | 41 | static void StringEqual(LPCWSTR expected, LPCWSTR actual, BOOL ignoreCase) |
43 | { | 42 | { |
44 | IEqualityComparer<String^>^ comparer = ignoreCase ? StringComparer::InvariantCultureIgnoreCase : StringComparer::InvariantCulture; | 43 | WixAssert::StringEqual(NativeAssert::LPWSTRToString(expected), NativeAssert::LPWSTRToString(actual), ignoreCase); |
45 | Assert::Equal(NativeAssert::LPWSTRToString(expected), NativeAssert::LPWSTRToString(actual), comparer); | ||
46 | } | 44 | } |
47 | 45 | ||
48 | static void Succeeded(HRESULT hr, LPCSTR zFormat, LPCSTR zArg, ... array<LPCSTR>^ zArgs) | 46 | static void Succeeded(HRESULT hr, LPCSTR zFormat, LPCSTR zArg, ... array<LPCSTR>^ zArgs) |