From 95b1be66d4c16b1b05b761c1771df229ac0e539c Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 31 Dec 2021 18:20:50 -0600 Subject: Try to get more helpful test failure messages. --- src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/internal/WixBuildTools.TestSupport.Native/NativeAssert.h') 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 { static void NotStringEqual(LPCWSTR expected, LPCWSTR actual, BOOL ignoreCase) { - IEqualityComparer^ comparer = ignoreCase ? StringComparer::InvariantCultureIgnoreCase : StringComparer::InvariantCulture; - Assert::NotEqual(NativeAssert::LPWSTRToString(expected), NativeAssert::LPWSTRToString(actual), comparer); + 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. @@ -41,8 +40,7 @@ namespace TestSupport { static void StringEqual(LPCWSTR expected, LPCWSTR actual, BOOL ignoreCase) { - IEqualityComparer^ comparer = ignoreCase ? StringComparer::InvariantCultureIgnoreCase : StringComparer::InvariantCulture; - Assert::Equal(NativeAssert::LPWSTRToString(expected), NativeAssert::LPWSTRToString(actual), comparer); + WixAssert::StringEqual(NativeAssert::LPWSTRToString(expected), NativeAssert::LPWSTRToString(actual), ignoreCase); } static void Succeeded(HRESULT hr, LPCSTR zFormat, LPCSTR zArg, ... array^ zArgs) -- cgit v1.2.3-55-g6feb