mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-22 15:24:34 +00:00
Tests: add missing swapchain destruction
In the swapchain recreation tests, the tests forgot to clean up the old swapchains.
This commit is contained in:
parent
b36ede0f36
commit
9b3e648141
@ -335,6 +335,7 @@ TEST_CASE("Swapchain", "[VkBootstrap.bootstrap]") {
|
|||||||
auto recreated_swapchain_ret = swapchain_builder.set_old_swapchain(swapchain).build();
|
auto recreated_swapchain_ret = swapchain_builder.set_old_swapchain(swapchain).build();
|
||||||
REQUIRE(recreated_swapchain_ret.has_value());
|
REQUIRE(recreated_swapchain_ret.has_value());
|
||||||
|
|
||||||
|
vkb::destroy_swapchain(swapchain_ret.value());
|
||||||
vkb::destroy_swapchain(recreated_swapchain_ret.value());
|
vkb::destroy_swapchain(recreated_swapchain_ret.value());
|
||||||
}
|
}
|
||||||
AND_THEN("Swapchain can be created from individual handles") {
|
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();
|
auto recreated_swapchain_ret = swapchain_builder.set_old_swapchain(swapchain).build();
|
||||||
REQUIRE(recreated_swapchain_ret.has_value());
|
REQUIRE(recreated_swapchain_ret.has_value());
|
||||||
|
|
||||||
|
vkb::destroy_swapchain(swapchain_ret.value());
|
||||||
vkb::destroy_swapchain(recreated_swapchain_ret.value());
|
vkb::destroy_swapchain(recreated_swapchain_ret.value());
|
||||||
}
|
}
|
||||||
AND_THEN("Swapchain can be create with default gotten handles") {
|
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();
|
auto recreated_swapchain_ret = swapchain_builder.set_old_swapchain(swapchain).build();
|
||||||
REQUIRE(recreated_swapchain_ret.has_value());
|
REQUIRE(recreated_swapchain_ret.has_value());
|
||||||
|
|
||||||
|
vkb::destroy_swapchain(swapchain_ret.value());
|
||||||
vkb::destroy_swapchain(recreated_swapchain_ret.value());
|
vkb::destroy_swapchain(recreated_swapchain_ret.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user