From 9b3e6481418b957e51c58941c8e971fea6924ebb Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Mon, 9 Jan 2023 11:49:58 -0700 Subject: [PATCH] Tests: add missing swapchain destruction In the swapchain recreation tests, the tests forgot to clean up the old swapchains. --- tests/bootstrap_tests.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/bootstrap_tests.cpp b/tests/bootstrap_tests.cpp index 24fbe84..30bf10f 100644 --- a/tests/bootstrap_tests.cpp +++ b/tests/bootstrap_tests.cpp @@ -335,6 +335,7 @@ TEST_CASE("Swapchain", "[VkBootstrap.bootstrap]") { auto recreated_swapchain_ret = swapchain_builder.set_old_swapchain(swapchain).build(); REQUIRE(recreated_swapchain_ret.has_value()); + vkb::destroy_swapchain(swapchain_ret.value()); vkb::destroy_swapchain(recreated_swapchain_ret.value()); } AND_THEN("Swapchain can be created from individual handles") { @@ -348,6 +349,7 @@ TEST_CASE("Swapchain", "[VkBootstrap.bootstrap]") { auto recreated_swapchain_ret = swapchain_builder.set_old_swapchain(swapchain).build(); REQUIRE(recreated_swapchain_ret.has_value()); + vkb::destroy_swapchain(swapchain_ret.value()); vkb::destroy_swapchain(recreated_swapchain_ret.value()); } AND_THEN("Swapchain can be create with default gotten handles") { @@ -360,6 +362,7 @@ TEST_CASE("Swapchain", "[VkBootstrap.bootstrap]") { auto recreated_swapchain_ret = swapchain_builder.set_old_swapchain(swapchain).build(); REQUIRE(recreated_swapchain_ret.has_value()); + vkb::destroy_swapchain(swapchain_ret.value()); vkb::destroy_swapchain(recreated_swapchain_ret.value()); } @@ -626,4 +629,4 @@ TEST_CASE("Querying Vulkan 1.1 and 1.2 features", "[VkBootstrap.version]") { } } -#endif \ No newline at end of file +#endif