Added window titles for tests

This commit is contained in:
Charles Giessen 2020-05-19 11:10:50 -06:00
parent 698be4e09b
commit a806c367f3
3 changed files with 7 additions and 7 deletions

View File

@ -39,7 +39,7 @@ struct RenderData {
}; };
int device_initialization (Init& init) { int device_initialization (Init& init) {
init.window = create_window_glfw (false); init.window = create_window_glfw ("Vulkan Triangle", false);
vkb::InstanceBuilder instance_builder; vkb::InstanceBuilder instance_builder;
auto instance_ret = instance_builder.use_default_debug_messenger ().request_validation_layers ().build (); auto instance_ret = instance_builder.use_default_debug_messenger ().request_validation_layers ().build ();

View File

@ -11,7 +11,7 @@
TEST_CASE ("Instance with surface", "[VkBootstrap.bootstrap]") { TEST_CASE ("Instance with surface", "[VkBootstrap.bootstrap]") {
GIVEN ("A window and a vulkan instance") { GIVEN ("A window and a vulkan instance") {
auto window = create_window_glfw (); auto window = create_window_glfw ("Instance with surface");
vkb::InstanceBuilder instance_builder; vkb::InstanceBuilder instance_builder;
auto instance_ret = instance_builder.use_default_debug_messenger ().build (); auto instance_ret = instance_builder.use_default_debug_messenger ().build ();
@ -118,7 +118,7 @@ TEST_CASE ("Headless Vulkan", "[VkBootstrap.bootstrap]") {
TEST_CASE ("Device Configuration", "[VkBootstrap.bootstrap]") { TEST_CASE ("Device Configuration", "[VkBootstrap.bootstrap]") {
auto window = create_window_glfw (); auto window = create_window_glfw ("Device Configuration");
vkb::InstanceBuilder builder; vkb::InstanceBuilder builder;
auto instance_ret = builder.request_validation_layers ().build (); auto instance_ret = builder.request_validation_layers ().build ();
@ -182,7 +182,7 @@ TEST_CASE ("Device Configuration", "[VkBootstrap.bootstrap]") {
TEST_CASE ("Swapchain", "[VkBootstrap.bootstrap]") { TEST_CASE ("Swapchain", "[VkBootstrap.bootstrap]") {
GIVEN ("A working instance, window, surface, and device") { GIVEN ("A working instance, window, surface, and device") {
auto window = create_window_glfw (); auto window = create_window_glfw ("Swapchain");
vkb::InstanceBuilder builder; vkb::InstanceBuilder builder;
auto instance_ret = builder.request_validation_layers ().build (); auto instance_ret = builder.request_validation_layers ().build ();
@ -274,7 +274,7 @@ TEST_CASE ("Allocation Callbacks", "[VkBootstrap.bootstrap]") {
allocation_callbacks.pfnReallocation = &shim_vkReallocationFunction; allocation_callbacks.pfnReallocation = &shim_vkReallocationFunction;
allocation_callbacks.pfnFree = &shim_vkFreeFunction; allocation_callbacks.pfnFree = &shim_vkFreeFunction;
auto window = create_window_glfw (); auto window = create_window_glfw ("Allocation Callbacks");
vkb::InstanceBuilder builder; vkb::InstanceBuilder builder;
auto instance_ret = auto instance_ret =

View File

@ -10,12 +10,12 @@
#include "../src/VkBootstrap.h" #include "../src/VkBootstrap.h"
GLFWwindow* create_window_glfw (bool resize = true) { GLFWwindow* create_window_glfw (const char * window_name = "", bool resize = true) {
glfwInit (); glfwInit ();
glfwWindowHint (GLFW_CLIENT_API, GLFW_NO_API); glfwWindowHint (GLFW_CLIENT_API, GLFW_NO_API);
if (!resize) glfwWindowHint (GLFW_RESIZABLE, GLFW_FALSE); if (!resize) glfwWindowHint (GLFW_RESIZABLE, GLFW_FALSE);
return glfwCreateWindow (640, 480, "Vulkan Triangle", NULL, NULL); return glfwCreateWindow (640, 480, window_name, NULL, NULL);
} }
void destroy_window_glfw (GLFWwindow* window) { void destroy_window_glfw (GLFWwindow* window) {
glfwDestroyWindow (window); glfwDestroyWindow (window);