From 7f642e51670bc38a4ef782a363936850bc2b0ba9 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 22 Apr 2021 06:38:23 -0700 Subject: Move dutil into libs/dutil --- src/test/DUtilUnitTest/GuidUtilTest.cpp | 60 --------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 src/test/DUtilUnitTest/GuidUtilTest.cpp (limited to 'src/test/DUtilUnitTest/GuidUtilTest.cpp') diff --git a/src/test/DUtilUnitTest/GuidUtilTest.cpp b/src/test/DUtilUnitTest/GuidUtilTest.cpp deleted file mode 100644 index a6e27a09..00000000 --- a/src/test/DUtilUnitTest/GuidUtilTest.cpp +++ /dev/null @@ -1,60 +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; -using namespace Xunit; -using namespace WixBuildTools::TestSupport; - -namespace DutilTests -{ - public ref class GuidUtil - { - public: - [Fact] - void GuidCreateTest() - { - HRESULT hr = S_OK; - WCHAR wzGuid1[GUID_STRING_LENGTH]; - WCHAR wzGuid2[GUID_STRING_LENGTH]; - - hr = GuidFixedCreate(wzGuid1); - NativeAssert::Succeeded(hr, "Failed to create first guid."); - Guid firstGuid = Guid::Parse(gcnew String(wzGuid1)); - - hr = GuidFixedCreate(wzGuid2); - NativeAssert::Succeeded(hr, "Failed to create second guid."); - Guid secondGuid = Guid::Parse(gcnew String(wzGuid2)); - - NativeAssert::NotStringEqual(wzGuid1, wzGuid2); - NativeAssert::NotEqual(firstGuid, secondGuid); - } - - [Fact] - void GuidCreateSczTest() - { - HRESULT hr = S_OK; - LPWSTR sczGuid1 = NULL; - LPWSTR sczGuid2 = NULL; - - try - { - hr = GuidCreate(&sczGuid1); - NativeAssert::Succeeded(hr, "Failed to create first guid."); - Guid firstGuid = Guid::Parse(gcnew String(sczGuid1)); - - hr = GuidCreate(&sczGuid2); - NativeAssert::Succeeded(hr, "Failed to create second guid."); - Guid secondGuid = Guid::Parse(gcnew String(sczGuid2)); - - NativeAssert::NotStringEqual(sczGuid1, sczGuid2); - NativeAssert::NotEqual(firstGuid, secondGuid); - } - finally - { - ReleaseStr(sczGuid1); - ReleaseStr(sczGuid2); - } - } - }; -} -- cgit v1.2.3-55-g6feb