tests: Clean up some MSVC++ compiler warnings
Known issues running tests on Windows:
- Compiler warnings from gtest that we haven’t spent the time to figure out
- Tests don’t run in place - you need to have them in the same directory with vulkan.dll,
gtest.dll, and if MSVC++ is not installed, the MSVC++ runtime dlls. If you want to use
the --compare-images option to vk_render_tests, you will need the “golden”
folder with golden images.
- vk_layer_validation_tests will fail unless you specify VK_LAYER_NAMES as Validation
in the registry or environment. You will also need to specify VK_LAYERS_PATH to point
to the layer dlls. The mismatched type validation test will fail regardless as the
check it is testing for did not make it into the SDK branch
- Known issue of parameter checker for CreateDepthStencilView expecting msaaResolveSubresource
to be valid even if msaa isn’t active
- Problem with runtime assert or hang in shader tracker - for now just remove the
shader checker files from your VK_LAYERS_PATH location.
diff --git a/tests/vktestframework.cpp b/tests/vktestframework.cpp
index 24b76a6..85e56fb 100644
--- a/tests/vktestframework.cpp
+++ b/tests/vktestframework.cpp
@@ -91,8 +91,8 @@
bool m_quit;
bool m_pause;
- uint32_t m_width;
- uint32_t m_height;
+ int m_width;
+ int m_height;
std::list<VkTestImageRecord>::iterator m_display_image;
@@ -236,7 +236,7 @@
{
string filename;
VkResult err;
- int x, y;
+ uint32_t x, y;
VkImageObj displayImage(image->device());
VkMemoryPropertyFlags reqs = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
@@ -319,14 +319,14 @@
magick_wand_1=NewMagickWand();
sprintf(testimage,"%s.ppm",basename);
status=MagickReadImage(magick_wand_1,testimage);
- ASSERT_TRUE(status) << "Unable to open file: " << testimage;
+ ASSERT_EQ(status, MagickTrue) << "Unable to open file: " << testimage;
MagickWandGenesis();
magick_wand_2=NewMagickWand();
sprintf(golden,"%s/%s.ppm",golddir,basename);
status=MagickReadImage(magick_wand_2,golden);
- ASSERT_TRUE(status) << "Unable to open file: " << golden;
+ ASSERT_EQ(status, MagickTrue) << "Unable to open file: " << golden;
compare_wand=MagickCompareImages(magick_wand_1,magick_wand_2, MeanAbsoluteErrorMetric, &differenz);
if (differenz != 0.0)