Add default gotten queues test for swapchain builder

This commit is contained in:
Charles Giessen 2020-10-26 13:21:59 -06:00
parent 988c0ea4e4
commit 947afe55c0

View File

@ -279,6 +279,19 @@ TEST_CASE ("Swapchain", "[VkBootstrap.bootstrap]") {
vkb::destroy_swapchain (recreated_swapchain_ret.value ());
}
AND_THEN ("Swapchain can be create with default gotten handles") {
vkb::SwapchainBuilder swapchain_builder (
device.physical_device.physical_device, device.device, surface);
auto swapchain_ret = swapchain_builder.build ();
REQUIRE (swapchain_ret.has_value ());
auto swapchain = swapchain_ret.value ();
auto recreated_swapchain_ret = swapchain_builder.set_old_swapchain (swapchain).build ();
REQUIRE (recreated_swapchain_ret.has_value ());
vkb::destroy_swapchain (recreated_swapchain_ret.value ());
}
vkb::destroy_device (device_ret.value ());
destroy_surface (instance_ret, surface);