From fe8681d53a3c8289d7ecae1a463be46ca1acfb76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 12 Dec 2021 20:14:58 +0100 Subject: [PATCH] AnyImageConverter: minor cleanup in the test. --- .../AnyImageConverter/Test/AnyImageConverterTest.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/MagnumPlugins/AnyImageConverter/Test/AnyImageConverterTest.cpp b/src/MagnumPlugins/AnyImageConverter/Test/AnyImageConverterTest.cpp index b246b566a7..a002c57fae 100644 --- a/src/MagnumPlugins/AnyImageConverter/Test/AnyImageConverterTest.cpp +++ b/src/MagnumPlugins/AnyImageConverter/Test/AnyImageConverterTest.cpp @@ -146,6 +146,7 @@ constexpr struct { {"HDR", "file.hdr", "HdrImageConverter"}, {"JPEG", "file.jpg", "JpegImageConverter"}, {"JPEG weird extension", "file.jpe", "JpegImageConverter"}, + /* Have at least one test case with uppercase */ {"JPEG uppercase", "output.JPG", "JpegImageConverter"}, {"KTX2", "foo.ktx2", "KtxImageConverter"}, {"PNG", "file.png", "PngImageConverter"} @@ -333,7 +334,7 @@ void AnyImageConverterTest::convert2D() { if(!(_manager.loadState("TgaImageConverter") & PluginManager::LoadState::Loaded)) CORRADE_SKIP("TgaImageConverter plugin not enabled, cannot test"); - const std::string filename = Utility::Directory::join(ANYIMAGECONVERTER_TEST_OUTPUT_DIR, "output.tga"); + const std::string filename = Utility::Directory::join(ANYIMAGECONVERTER_TEST_OUTPUT_DIR, "2d.tga"); if(Utility::Directory::exists(filename)) CORRADE_VERIFY(Utility::Directory::rm(filename)); @@ -905,13 +906,12 @@ void AnyImageConverterTest::propagateConfigurationUnknown2D() { if(!(_manager.loadState("TgaImageConverter") & PluginManager::LoadState::Loaded)) CORRADE_SKIP("TgaImageConverter plugin not enabled, cannot test"); - /* Just test that the exported file exists */ Containers::Pointer converter = _manager.instantiate("AnyImageConverter"); converter->configuration().setValue("noSuchOption", "isHere"); std::ostringstream out; Warning redirectWarning{&out}; - CORRADE_VERIFY(converter->convertToFile(Image2D, Utility::Directory::join(ANYIMAGECONVERTER_TEST_OUTPUT_DIR, "output.tga"))); + CORRADE_VERIFY(converter->convertToFile(Image2D, Utility::Directory::join(ANYIMAGECONVERTER_TEST_OUTPUT_DIR, "2d.tga"))); CORRADE_COMPARE(out.str(), "Trade::AnyImageConverter::convertToFile(): option noSuchOption not recognized by TgaImageConverter\n"); } @@ -924,7 +924,6 @@ void AnyImageConverterTest::propagateConfigurationUnknown3D() { if(manager.loadState("KtxImageConverter") < PluginManager::LoadState::Loaded) CORRADE_SKIP("KtxImageConverter plugin can't be loaded."); - /* Just test that the exported file exists */ Containers::Pointer converter = manager.instantiate("AnyImageConverter"); converter->configuration().setValue("noSuchOption", "isHere");