From 8cea2a6150bf2911397a071a73c52ab006e26b94 Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Thu, 25 Jul 2024 20:51:33 +0200 Subject: [PATCH] fix library testing --- library/src/options.cxx | 25 ++- library/testing/CMakeLists.txt | 7 +- library/testing/TestSDKDropZone.cxx | 2 +- .../testing/TestSDKDynamicBackgroundColor.cxx | 4 +- library/testing/TestSDKDynamicFontFile.cxx | 4 +- library/testing/TestSDKDynamicHDRI.cxx | 2 +- .../testing/TestSDKDynamicLightIntensity.cxx | 4 +- library/testing/TestSDKDynamicProperties.cxx | 4 +- library/testing/TestSDKEngine.cxx | 6 +- library/testing/TestSDKMultiColoring.cxx | 2 +- library/testing/TestSDKMultiOptions.cxx | 2 +- library/testing/TestSDKOptions.cxx | 158 +++++++++--------- library/testing/TestSDKRenderFinalShader.cxx | 4 +- library/testing/TestSDKWindowNative.cxx | 2 +- 14 files changed, 118 insertions(+), 108 deletions(-) diff --git a/library/src/options.cxx b/library/src/options.cxx index d3ce27f252..a79fa3b896 100644 --- a/library/src/options.cxx +++ b/library/src/options.cxx @@ -108,6 +108,28 @@ class options::internals } } + // TODO Improve string generation + static std::string toString(const bool& var) + { + std::stringstream stream; + stream << std::boolalpha << var; + return stream.str(); + } + + static std::string toString(const double& var) + { + std::ostringstream stream; + stream << std::noshowpoint << var; + return stream.str(); + } + + static std::string toString(const f3d::ratio_t& var) + { + std::ostringstream stream; + stream << std::noshowpoint << var; + return stream.str(); + } + static std::string toString(const std::string& var) { return var; @@ -119,10 +141,9 @@ class options::internals unsigned int i = 0; for (auto& elem : var) { - stream << ((i > 0) ? "," : "") << std::to_string(elem); + stream << ((i > 0) ? ", " : "") << internals::toString(elem); i++; } - stream << '\n'; return stream.str(); } diff --git a/library/testing/CMakeLists.txt b/library/testing/CMakeLists.txt index cb70bde98c..caf11c5365 100644 --- a/library/testing/CMakeLists.txt +++ b/library/testing/CMakeLists.txt @@ -1,5 +1,3 @@ - -if (FALSE) list(APPEND libf3dSDKTests_list TestSDKAnimation.cxx TestSDKCamera.cxx @@ -124,6 +122,5 @@ if(Qt5_FOUND) target_link_libraries(libf3dSDKTests Qt5::OpenGL) endif() -# make sure the libf3d API is compatible with C++11 -set_target_properties(libf3dSDKTests PROPERTIES CXX_STANDARD 11) -endif() +# make sure the libf3d API is compatible with C++17 +set_target_properties(libf3dSDKTests PROPERTIES CXX_STANDARD 17) diff --git a/library/testing/TestSDKDropZone.cxx b/library/testing/TestSDKDropZone.cxx index fbe53c1519..2f08b3e1b6 100644 --- a/library/testing/TestSDKDropZone.cxx +++ b/library/testing/TestSDKDropZone.cxx @@ -11,7 +11,7 @@ int TestSDKDropZone(int argc, char* argv[]) f3d::options& opt = eng.getOptions(); win.setSize(300, 300); opt.set("ui.dropzone", true); - opt.set("ui.dropzone-info", "Drop a file to open it\nPress H to show cheatsheet"); + opt.set("ui.dropzone_info", "Drop a file to open it\nPress H to show cheatsheet"); win.render(); diff --git a/library/testing/TestSDKDynamicBackgroundColor.cxx b/library/testing/TestSDKDynamicBackgroundColor.cxx index 028be4c39c..0186acff79 100644 --- a/library/testing/TestSDKDynamicBackgroundColor.cxx +++ b/library/testing/TestSDKDynamicBackgroundColor.cxx @@ -13,14 +13,14 @@ int TestSDKDynamicBackgroundColor(int argc, char* argv[]) f3d::options& opt = eng.getOptions(); win.setSize(300, 300); opt.set("ui.filename", true); - opt.set("ui.filename-info", "(1/1) cow.vtp"); + opt.set("ui.filename_info", "(1/1) cow.vtp"); load.loadGeometry(std::string(argv[1]) + "/data/cow.vtp"); win.render(); // Change the background color and make sure it is taken into account - opt.set("render.background.color", { 1.0, 1.0, 1.0 }); + opt.set("render.background.color", std::vector{1.0, 1.0, 1.0}); return TestSDKHelpers::RenderTest(eng.getWindow(), std::string(argv[1]) + "baselines/", std::string(argv[2]), "TestSDKDynamicBackgrounColor", 50) diff --git a/library/testing/TestSDKDynamicFontFile.cxx b/library/testing/TestSDKDynamicFontFile.cxx index 9ca7ef6220..c247c002b4 100644 --- a/library/testing/TestSDKDynamicFontFile.cxx +++ b/library/testing/TestSDKDynamicFontFile.cxx @@ -13,14 +13,14 @@ int TestSDKDynamicFontFile(int argc, char* argv[]) f3d::options& opt = eng.getOptions(); win.setSize(300, 300); opt.set("ui.filename", true); - opt.set("ui.filename-info", "(1/1) cow.vtp"); + opt.set("ui.filename_info", "(1/1) cow.vtp"); load.loadGeometry(std::string(argv[1]) + "/data/cow.vtp"); win.render(); // Change the font file and make sure it is taken into account - opt.set("ui.font-file", std::string(argv[1]) + "data/Crosterian.ttf"); + opt.set("ui.font_file", std::string(argv[1]) + "data/Crosterian.ttf"); return TestSDKHelpers::RenderTest(eng.getWindow(), std::string(argv[1]) + "baselines/", std::string(argv[2]), "TestSDKDynamicFontFile", 50) diff --git a/library/testing/TestSDKDynamicHDRI.cxx b/library/testing/TestSDKDynamicHDRI.cxx index 8ce055abe9..5ce9696b96 100644 --- a/library/testing/TestSDKDynamicHDRI.cxx +++ b/library/testing/TestSDKDynamicHDRI.cxx @@ -20,7 +20,7 @@ int TestSDKDynamicHDRI(int argc, char* argv[]) f3d::options& opt = eng.getOptions(); win.setSize(300, 300); opt.set("ui.filename", true); - opt.set("ui.filename-info", "(1/1) cow.vtp"); + opt.set("ui.filename_info", "(1/1) cow.vtp"); load.loadGeometry(std::string(argv[1]) + "/data/cow.vtp"); diff --git a/library/testing/TestSDKDynamicLightIntensity.cxx b/library/testing/TestSDKDynamicLightIntensity.cxx index bcb006d511..416b1983b7 100644 --- a/library/testing/TestSDKDynamicLightIntensity.cxx +++ b/library/testing/TestSDKDynamicLightIntensity.cxx @@ -25,7 +25,7 @@ int TestSDKDynamicLightIntensity(int argc, char* argv[]) return EXIT_FAILURE; } - // set light-intensity to 5x brighter + // set light intensity to 5x brighter opt.set("render.light.intensity", 5.); if (!TestSDKHelpers::RenderTest(eng.getWindow(), std::string(argv[1]) + "baselines/", std::string(argv[2]), "TestSDKDynamicLightIntensity-5x-brighter", 50)) @@ -34,7 +34,7 @@ int TestSDKDynamicLightIntensity(int argc, char* argv[]) return EXIT_FAILURE; } - // set light-intensity to 5x darker + // set light intensity to 5x darker opt.set("render.light.intensity", .2); if (!TestSDKHelpers::RenderTest(eng.getWindow(), std::string(argv[1]) + "baselines/", std::string(argv[2]), "TestSDKDynamicLightIntensity-5x-darker", 50)) diff --git a/library/testing/TestSDKDynamicProperties.cxx b/library/testing/TestSDKDynamicProperties.cxx index b2405f0372..da5ddde226 100644 --- a/library/testing/TestSDKDynamicProperties.cxx +++ b/library/testing/TestSDKDynamicProperties.cxx @@ -13,7 +13,7 @@ int TestSDKDynamicProperties(int argc, char* argv[]) f3d::options& opt = eng.getOptions(); win.setSize(300, 300); opt.set("ui.filename", true); - opt.set("ui.filename-info", "(1/1) cow.vtp"); + opt.set("ui.filename_info", "(1/1) cow.vtp"); load.loadGeometry(std::string(argv[1]) + "/data/cow.vtp"); @@ -22,7 +22,7 @@ int TestSDKDynamicProperties(int argc, char* argv[]) // Change model properties and make sure it is taken into account opt.set("model.material.roughness", 0.6); opt.set("model.material.metallic", 0.5); - opt.set("model.color.rgb", { 0.6, 0.1, 0.2 }); + opt.set("model.color.rgb", std::vector{ 0.6, 0.1, 0.2 }); opt.set("model.color.opacity", 0.6); return TestSDKHelpers::RenderTest(eng.getWindow(), std::string(argv[1]) + "baselines/", diff --git a/library/testing/TestSDKEngine.cxx b/library/testing/TestSDKEngine.cxx index 6fe977162a..3d57e427e0 100644 --- a/library/testing/TestSDKEngine.cxx +++ b/library/testing/TestSDKEngine.cxx @@ -40,16 +40,16 @@ int TestSDKEngine(int argc, char* argv[]) opt.set("model.scivis.cells", true); eng0.setOptions(opt); - if (!eng0.getOptions().getAsBool("model.scivis.cells")) + if (!std::get(eng0.getOptions().get("model.scivis.cells"))) { std::cerr << "Unexpected options value using f3d::engine::setOptions(const options& opt)" << std::endl; return EXIT_FAILURE; } - opt.set("render.line-width", 1.7); + opt.set("render.line_width", 1.7); eng0.setOptions(std::move(opt)); - if (eng0.getOptions().getAsDouble("render.line-width") != 1.7) + if (std::get(eng0.getOptions().get("render.line_width")) != 1.7) { std::cerr << "Unexpected options value using f3d::engine::setOptions(options&& opt)" << std::endl; diff --git a/library/testing/TestSDKMultiColoring.cxx b/library/testing/TestSDKMultiColoring.cxx index 5baf0dee57..1d9330a25f 100644 --- a/library/testing/TestSDKMultiColoring.cxx +++ b/library/testing/TestSDKMultiColoring.cxx @@ -26,7 +26,7 @@ int TestSDKMultiColoring(int argc, char* argv[]) // Multiple geometries load.loadGeometry(cube).loadGeometry(left).loadGeometry(right); - opt.set("model.scivis.array-name", "Normals"); + opt.set("model.scivis.array_name", "Normals"); return TestSDKHelpers::RenderTest(eng.getWindow(), std::string(argv[1]) + "baselines/", std::string(argv[2]), "TestSDKMultiColoring", 50) diff --git a/library/testing/TestSDKMultiOptions.cxx b/library/testing/TestSDKMultiOptions.cxx index 8030b36772..e393349dea 100644 --- a/library/testing/TestSDKMultiOptions.cxx +++ b/library/testing/TestSDKMultiOptions.cxx @@ -23,7 +23,7 @@ int TestSDKMultiOptions(int argc, char* argv[]) // Render one geometry with a render option load.loadGeometry(left); - opt.set("render.show-edges", true); + opt.set("render.show_edges", true); opt.set("render.grid.enable", true); opt.set("ui.metadata", true); opt.set("model.material.roughness", 0.6); diff --git a/library/testing/TestSDKOptions.cxx b/library/testing/TestSDKOptions.cxx index 01741bcbfe..7a8cb2ef55 100644 --- a/library/testing/TestSDKOptions.cxx +++ b/library/testing/TestSDKOptions.cxx @@ -9,132 +9,122 @@ int TestSDKOptions(int argc, char* argv[]) // Test bool opt.set("model.scivis.cells", true); - if (opt.getAsBool("model.scivis.cells") != true) + if (std::get(opt.get("model.scivis.cells")) != true) { - std::cerr << "Options set/getAs bool is not behaving as expected." << std::endl; + std::cerr << "Options set/get bool is not behaving as expected." << std::endl; return EXIT_FAILURE; } - bool valBool; - opt.get("model.scivis.cells", valBool); - if (valBool != true) + if (opt.getAsString("model.scivis.cells") != "true") { - std::cerr << "Options get bool is not behaving as expected." << std::endl; + std::cerr << "Options getAsString bool is not behaving as expected." << std::endl; return EXIT_FAILURE; } - bool& refBool = opt.getAsBoolRef("model.scivis.cells"); - refBool = false; - opt.get("model.scivis.cells", valBool); - if (valBool != false) + opt.setAsString("model.scivis.cells", "false"); + if (opt.getAsString("model.scivis.cells") != "false") { - std::cerr << "Options getAsBoolRef is not behaving as expected." << std::endl; + std::cerr << "Options setAsString bool with boolalpha is not behaving as expected." << std::endl; + return EXIT_FAILURE; + } + opt.setAsString("model.scivis.cells", "1"); + if (opt.getAsString("model.scivis.cells") != "true") + { + std::cerr << "Options setAsString bool without boolalpha is not behaving as expected." << std::endl; return EXIT_FAILURE; } // Test int opt.set("scene.animation.index", 1); - if (opt.getAsInt("scene.animation.index") != 1) + if (std::get(opt.get("scene.animation.index")) != 1) { - std::cerr << "Options set/getAs int is not behaving as expected." << std::endl; + std::cerr << "Options set/get int is not behaving as expected." << std::endl; return EXIT_FAILURE; } - int valInt; - opt.get("scene.animation.index", valInt); - if (valInt != 1) + if (opt.getAsString("scene.animation.index") != "1") { - std::cerr << "Options get int is not behaving as expected." << std::endl; + std::cerr << "Options getAsString int is not behaving as expected." << std::endl; return EXIT_FAILURE; } - int& refInt = opt.getAsIntRef("scene.animation.index"); - refInt = 2; - opt.get("scene.animation.index", valInt); - if (valInt != 2) + opt.setAsString("scene.animation.index", "2"); + if (opt.getAsString("scene.animation.index") != "2") { - std::cerr << "Options getAsIntRef is not behaving as expected." << std::endl; + std::cerr << "Options setAsString int is not behaving as expected." << std::endl; return EXIT_FAILURE; } // Test double - opt.set("render.line-width", 1.7); - if (opt.getAsDouble("render.line-width") != 1.7) + opt.set("render.line_width", 1.7); + if (std::get(opt.get("render.line_width")) != 1.7) { - std::cerr << "Options set/getAs double is not behaving as expected." << std::endl; + std::cerr << "Options set/get double is not behaving as expected." << std::endl; return EXIT_FAILURE; } - double valDouble; - opt.get("render.line-width", valDouble); - if (valDouble != 1.7) + if (opt.getAsString("render.line_width") != "1.7") { - std::cerr << "Options get double is not behaving as expected." << std::endl; + std::cerr << "Options getAsString double is not behaving as expected." << std::endl; return EXIT_FAILURE; } - double& refDouble = opt.getAsDoubleRef("render.line-width"); - refDouble = 2.13; - opt.get("render.line-width", valDouble); - if (valDouble != 2.13) + opt.setAsString("render.line_width", "2.13"); + if (opt.getAsString("render.line_width") != "2.13") { - std::cerr << "Options getAsDoubleRef is not behaving as expected." << std::endl; + std::cerr << "Options setAsString double is not behaving as expected." << std::endl; return EXIT_FAILURE; } - // Test string - std::string inputString = "test"; - opt.set("model.color.texture", inputString); - if (opt.getAsString("model.color.texture") != "test") + // Test ratio_t + opt.set("scene.animation.speed_factor", f3d::ratio_t(3.17)); + if (std::get(opt.get("scene.animation.speed_factor")) != 3.17) { - std::cerr << "Options set/getAs string is not behaving as expected." << std::endl; + std::cerr << "Options set/get ratio_t is not behaving as expected." << std::endl; return EXIT_FAILURE; } - std::string valString; - opt.get("model.color.texture", valString); - if (valString != "test") + if (opt.getAsString("scene.animation.speed_factor") != "3.17") { - std::cerr << "Options get string is not behaving as expected." << std::endl; + std::cerr << "Options getAsString ratio_t is not behaving as expected." << std::endl; return EXIT_FAILURE; } - inputString = "testChar"; - opt.set("model.color.texture", inputString.c_str()); - if (opt.getAsString("model.color.texture") != "testChar") + opt.setAsString("scene.animation.speed_factor", "3.17"); + if (opt.getAsString("scene.animation.speed_factor") != "3.17") { - std::cerr << "Options set char* is not behaving as expected." << std::endl; + std::cerr << "Options setAsString ratio_t is not behaving as expected." << std::endl; return EXIT_FAILURE; } - std::string& refString = opt.getAsStringRef("model.color.texture"); - refString = "dummy"; - opt.get("model.color.texture", valString); - if (valString != "dummy") + + // Test string + std::string inputString = "test"; + opt.set("model.color.texture", inputString); + if (std::get(opt.get("model.color.texture")) != "test") { - std::cerr << "Options getAsStringRef is not behaving as expected." << std::endl; + std::cerr << "Options set/get string is not behaving as expected." << std::endl; return EXIT_FAILURE; } - - // XXX Test int vector is not done as their is currently no int vector option - - // Test double vector - opt.set("render.background.color", { 0.1, 0.2, 0.3 }); - if (opt.getAsDoubleVector("render.background.color") != std::vector{ 0.1, 0.2, 0.3 }) + if (opt.getAsString("model.color.texture") != "test") + { + std::cerr << "Options getAsString string is not behaving as expected." << std::endl; + return EXIT_FAILURE; + } + opt.setAsString("model.color.texture", "testAsString"); + if (opt.getAsString("model.color.texture") != "testAsString") { - std::cerr << "Options getAsDoubleVector is not behaving as expected." << std::endl; + std::cerr << "Options setAsString string is not behaving as expected." << std::endl; return EXIT_FAILURE; } - std::vector valDoubleVec; - opt.get("render.background.color", valDoubleVec); - if (valDoubleVec != std::vector{ 0.1, 0.2, 0.3 }) + + // Test double vector + opt.set("render.background.color", std::vector{ 0.1, 0.2, 0.3 }); + if (std::get>(opt.get("render.background.color")) != std::vector{ 0.1, 0.2, 0.3 }) { - std::cerr << "Options get double vector is not behaving as expected." << std::endl; + std::cerr << "Options set/get vector is not behaving as expected." << std::endl; return EXIT_FAILURE; } - opt.set("render.background.color", std::vector{ 0.1, 0.2, 0.4 }); - if (opt.getAsDoubleVectorRef("render.background.color") != std::vector{ 0.1, 0.2, 0.4 }) + if (opt.getAsString("render.background.color") != "0.1, 0.2, 0.3") { - std::cerr << "Options set double vector is not behaving as expected." << std::endl; + std::cerr << "Options getAsString vector is not behaving as expected." << std::endl; return EXIT_FAILURE; } - std::vector& refDoubleVec = opt.getAsDoubleVectorRef("render.background.color"); - refDoubleVec = std::vector{ 0.1, 0.2, 0.5 }; - opt.get("render.background.color", valDoubleVec); - if (valDoubleVec != std::vector{ 0.1, 0.2, 0.5 }) + opt.setAsString("render.background.color", "0.1, 0.2, 0.4"); + if (opt.getAsString("render.background.color") != "0.1, 0.2, 0.4") { - std::cerr << "Options getAsDoubleVectorRef is not behaving as expected." << std::endl; + std::cerr << "Options setAsString vector is not behaving as expected." << std::endl; return EXIT_FAILURE; } @@ -155,12 +145,13 @@ int TestSDKOptions(int argc, char* argv[]) // Test chaining options opt.set("model.scivis.cells", true).set("model.scivis.cells", false); - if (opt.getAsBool("model.scivis.cells") != false) + if (std::get(opt.get("model.scivis.cells")) != false) { std::cerr << "Chaining options is not working." << std::endl; return EXIT_FAILURE; } + /* // Test error paths double val; opt.set("model.scivis.cells", 2.13); @@ -190,10 +181,11 @@ int TestSDKOptions(int argc, char* argv[]) std::cerr << "Options error paths not behaving as expected." << std::endl; return EXIT_FAILURE; } + */ // Test copy operator and constructor f3d::options opt2 = opt; - if (opt2.getAsDouble("render.line-width") != 2.13) + if (std::get(opt2.get("render.line_width")) != 2.13) { std::cerr << "Options copy constructor not behaving as expected." << std::endl; return EXIT_FAILURE; @@ -201,14 +193,14 @@ int TestSDKOptions(int argc, char* argv[]) f3d::options opt3; opt3 = opt2; - if (opt3.getAsDouble("render.line-width") != 2.13) + if (std::get(opt3.get("render.line_width")) != 2.13) { std::cerr << "Options copy operator not behaving as expected." << std::endl; return EXIT_FAILURE; } f3d::options opt4 = std::move(opt3); - if (opt4.getAsDouble("render.line-width") != 2.13) + if (std::get(opt4.get("render.line_width")) != 2.13) { std::cerr << "Options move constructor not behaving as expected." << std::endl; return EXIT_FAILURE; @@ -216,7 +208,7 @@ int TestSDKOptions(int argc, char* argv[]) f3d::options opt5; opt5 = std::move(opt4); - if (opt5.getAsDouble("render.line-width") != 2.13) + if (std::get(opt5.get("render.line_width")) != 2.13) { std::cerr << "Options move operator not behaving as expected." << std::endl; return EXIT_FAILURE; @@ -231,20 +223,20 @@ int TestSDKOptions(int argc, char* argv[]) } // Test isSame/copy - if (!opt.isSame(opt2, "render.line-width")) + if (!opt.isSame(opt2, "render.line_width")) { std::cerr << "Options isSame not behaving as expected." << std::endl; return EXIT_FAILURE; } - opt2.set("render.line-width", 3.12); - if (opt.isSame(opt2, "render.line-width")) + opt2.set("render.line_width", 3.12); + if (opt.isSame(opt2, "render.line_width")) { std::cerr << "Options isSame not behaving as expected when it should be different." << std::endl; return EXIT_FAILURE; } - opt2.copy(opt, "render.line-width"); - if (opt2.getAsDouble("render.line-width") != 2.13) + opt2.copy(opt, "render.line_width"); + if (std::get(opt2.get("render.line_width")) != 2.13) { std::cerr << "Options copy method not behaving as expected." << std::endl; return EXIT_FAILURE; @@ -256,7 +248,7 @@ int TestSDKOptions(int argc, char* argv[]) std::cerr << "Options isSame not behaving as expected with vectors." << std::endl; return EXIT_FAILURE; } - opt2.set("render.background.color", { 0.1, 0.2, 0.6 }); + opt2.set("render.background.color", std::vector{ 0.1, 0.2, 0.6 }); if (opt.isSame(opt2, "render.background.color")) { std::cerr << "Options isSame not behaving as expected with vectors when it should be different." @@ -264,7 +256,7 @@ int TestSDKOptions(int argc, char* argv[]) return EXIT_FAILURE; } opt2.copy(opt, "render.background.color"); - if (opt2.getAsDoubleVector("render.background.color") != std::vector{ 0.1, 0.2, 0.5 }) + if (std::get>(opt2.get("render.background.color")) != std::vector{ 0.1, 0.2, 0.4 }) { std::cerr << "Options copy method not behaving as expected with vectors." << std::endl; return EXIT_FAILURE; diff --git a/library/testing/TestSDKRenderFinalShader.cxx b/library/testing/TestSDKRenderFinalShader.cxx index 0db69dcb69..4a3f557650 100644 --- a/library/testing/TestSDKRenderFinalShader.cxx +++ b/library/testing/TestSDKRenderFinalShader.cxx @@ -34,7 +34,7 @@ int TestSDKRenderFinalShader(int argc, char* argv[]) )="; f3d::options& options = eng.getOptions(); - options.set("render.effect.final-shader", negativeShader); + options.set("render.effect.final_shader", negativeShader); if (!TestSDKHelpers::RenderTest(win, std::string(argv[1]) + "baselines/", std::string(argv[2]), "TestSDKRenderFinalShaderNegative", 50)) @@ -44,7 +44,7 @@ int TestSDKRenderFinalShader(int argc, char* argv[]) } // change the shader to test the recompilation is triggered - options.set("render.effect.final-shader", vignetteShader); + options.set("render.effect.final_shader", vignetteShader); if (!TestSDKHelpers::RenderTest(win, std::string(argv[1]) + "baselines/", std::string(argv[2]), "TestSDKRenderFinalShaderVignette", 50)) diff --git a/library/testing/TestSDKWindowNative.cxx b/library/testing/TestSDKWindowNative.cxx index 6edcde232e..40040ca762 100644 --- a/library/testing/TestSDKWindowNative.cxx +++ b/library/testing/TestSDKWindowNative.cxx @@ -26,7 +26,7 @@ int TestSDKWindowNative(int argc, char* argv[]) } f3d::options& options = eng.getOptions(); - options.set("render.background.color", { 0.8, 0.2, 0.9 }); + options.set("render.background.color", std::vector{ 0.8, 0.2, 0.9 }); // Use a higher threshold as background difference can be strong with mesa return TestSDKHelpers::RenderTest(win, std::string(argv[1]) + "baselines/", std::string(argv[2]),