Skip to content

Commit e6221d8

Browse files
committed
Check return value of vmaCopyMemoryToAllocation in tests
1 parent c772b29 commit e6221d8

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/Tests.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6181,7 +6181,8 @@ static void TestDataUploadingWithStagingBuffer()
61816181
TEST(result == VK_SUCCESS);
61826182

61836183
TEST(stagingBufferAllocInfo.pMappedData != nullptr);
6184-
vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), stagingBufferAlloc, 0, bufferData.size());
6184+
result = vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), stagingBufferAlloc, 0, bufferData.size());
6185+
TEST(result == VK_SUCCESS);
61856186

61866187
BeginSingleTimeCommands();
61876188

@@ -6251,7 +6252,8 @@ static void TestDataUploadingWithMappedMemory() {
62516252
TEST(memPropFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT);
62526253

62536254
TEST(uniformBufferAllocInfo.pMappedData != nullptr);
6254-
vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), uniformBufferAlloc, 0, bufferData.size());
6255+
result = vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), uniformBufferAlloc, 0, bufferData.size());
6256+
TEST(result == VK_SUCCESS);
62556257

62566258
BeginSingleTimeCommands();
62576259

@@ -6303,7 +6305,8 @@ static void TestAdvancedDataUploading() {
63036305
if (memPropFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) {
63046306
// The allocation ended up as mapped memory.
63056307
TEST(uniformBufferAllocInfo.pMappedData != nullptr);
6306-
vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), uniformBufferAlloc, 0, bufferData.size());
6308+
result = vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), uniformBufferAlloc, 0, bufferData.size());
6309+
TEST(result == VK_SUCCESS);
63076310

63086311
BeginSingleTimeCommands();
63096312

@@ -6338,7 +6341,8 @@ static void TestAdvancedDataUploading() {
63386341
TEST(result == VK_SUCCESS);
63396342

63406343
TEST(stagingBufferAllocInfo.pMappedData != nullptr);
6341-
vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), stagingBufferAlloc, 0, bufferData.size());
6344+
result = vmaCopyMemoryToAllocation(g_hAllocator, bufferData.data(), stagingBufferAlloc, 0, bufferData.size());
6345+
TEST(result == VK_SUCCESS);
63426346

63436347
BeginSingleTimeCommands();
63446348

0 commit comments

Comments
 (0)