From 67738094d358d1b3ec218281009bcbe4d4ee7dc7 Mon Sep 17 00:00:00 2001 From: "Bernhart, Bryan" Date: Fri, 16 Dec 2022 15:34:42 -0800 Subject: [PATCH] Suppress memory leak error on CreateImage failure. --- src/tests/VKTest.h | 3 +++ src/tests/end2end/VKResourceAllocatorTests.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tests/VKTest.h b/src/tests/VKTest.h index 683c8bd97..3519750ad 100644 --- a/src/tests/VKTest.h +++ b/src/tests/VKTest.h @@ -22,6 +22,9 @@ #define ASSERT_FAILED(expr) ASSERT_TRUE((expr) != VK_SUCCESS) #define ASSERT_SUCCESS(expr) ASSERT_TRUE((expr) == VK_SUCCESS) +#define EXPECT_FAILED(expr) EXPECT_TRUE((expr) != VK_SUCCESS) +#define EXPECT_SUCCEEDED(expr) EXPECT_TRUE((expr) == VK_SUCCESS) + namespace gpgmm::vk { struct GpAllocatorCreateInfo; diff --git a/src/tests/end2end/VKResourceAllocatorTests.cpp b/src/tests/end2end/VKResourceAllocatorTests.cpp index 5cc3aa311..5d8661040 100644 --- a/src/tests/end2end/VKResourceAllocatorTests.cpp +++ b/src/tests/end2end/VKResourceAllocatorTests.cpp @@ -80,7 +80,7 @@ TEST_F(VKResourceAllocatorTests, CreateImage) { VkImage image; GpResourceAllocation allocation; - ASSERT_SUCCESS( + EXPECT_SUCCEEDED( gpCreateImage(resourceAllocator, &imageInfo, &image, &allocationInfo, &allocation)); gpDestroyImage(resourceAllocator, image, allocation);