return *this;
}
-testing::AssertionResult InstWrapper::CheckCreate(VkResult result_to_check) {
- VkResult res = functions->vkCreateInstance(create_info.get(), callbacks, &inst);
- if (res == result_to_check)
- return testing::AssertionSuccess();
- else
- return testing::AssertionFailure() << " Expected VkCreateInstance to return " << result_to_check << " but got " << res;
+void InstWrapper::CheckCreate(VkResult result_to_check) {
+ ASSERT_EQ(result_to_check, functions->vkCreateInstance(create_info.get(), callbacks, &inst));
}
std::vector<VkPhysicalDevice> InstWrapper::GetPhysDevs(uint32_t phys_dev_count, VkResult result_to_check) {
InstWrapper& operator=(InstWrapper&&) noexcept;
// Construct this VkInstance using googletest to assert if it succeeded
- testing::AssertionResult CheckCreate(VkResult result_to_check = VK_SUCCESS);
+ void CheckCreate(VkResult result_to_check = VK_SUCCESS);
// Convenience
operator VkInstance() { return inst; }