Browse Source

Test: use CORRADE_FAIL() where it makes sense.

Of course I used the wrong `CORRADE_FAIL_IF(false, ...)` in a few
places. Yet another confirmation it was too hard to use and a dedicated
macro is needed.
pull/605/head
Vladimír Vondruš 4 years ago
parent
commit
7547cf8977
  1. 2
      src/Magnum/Audio/Test/GlobalStateAcrossLibrariesALTest.cpp
  2. 4
      src/Magnum/GL/Test/GlobalStateAcrossLibrariesGLTest.cpp
  3. 14
      src/Magnum/GL/Test/MeshGLTest.cpp
  4. 88
      src/Magnum/ShaderTools/Test/AbstractConverterTest.cpp
  5. 2
      src/Magnum/Text/Test/AbstractFontConverterTest.cpp
  6. 40
      src/Magnum/Trade/Test/AbstractSceneConverterTest.cpp

2
src/Magnum/Audio/Test/GlobalStateAcrossLibrariesALTest.cpp

@ -43,7 +43,7 @@ GlobalStateAcrossLibrariesALTest::GlobalStateAcrossLibrariesALTest() {
void GlobalStateAcrossLibrariesALTest::test() {
#if defined(MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS) && !defined(MAGNUM_BUILD_STATIC)
CORRADE_VERIFY(!"MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS enabled but MAGNUM_BUILD_STATIC not");
CORRADE_FAIL("MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS enabled but MAGNUM_BUILD_STATIC not");
#endif
Context context;

4
src/Magnum/GL/Test/GlobalStateAcrossLibrariesGLTest.cpp

@ -44,7 +44,7 @@ GlobalStateAcrossLibrariesGLTest::GlobalStateAcrossLibrariesGLTest() {
void GlobalStateAcrossLibrariesGLTest::magnumContext() {
#if defined(MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS) && !defined(MAGNUM_BUILD_STATIC)
CORRADE_VERIFY(!"MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS enabled but MAGNUM_BUILD_STATIC not");
CORRADE_FAIL("MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS enabled but MAGNUM_BUILD_STATIC not");
#endif
CORRADE_VERIFY(GL::Context::hasCurrent());
@ -59,7 +59,7 @@ void GlobalStateAcrossLibrariesGLTest::magnumContext() {
void GlobalStateAcrossLibrariesGLTest::functionPointers() {
#if defined(MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS) && !defined(MAGNUM_BUILD_STATIC)
CORRADE_VERIFY(!"MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS enabled but MAGNUM_BUILD_STATIC not");
CORRADE_FAIL("MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS enabled but MAGNUM_BUILD_STATIC not");
#endif
CORRADE_VERIFY(glCreateProgram);

14
src/Magnum/GL/Test/MeshGLTest.cpp

@ -4148,7 +4148,7 @@ template<class T> void MeshGLTest::multiDrawIndexed() {
if(!Context::current().isExtensionSupported<Extensions::WEBGL::multi_draw_instanced_base_vertex_base_instance>())
CORRADE_SKIP(Extensions::WEBGL::multi_draw_instanced_base_vertex_base_instance::string() << "is not supported.");
#else
CORRADE_FAIL_IF(false, "Can't do base vertex here.");
CORRADE_FAIL("Can't do base vertex here.");
#endif
}
@ -4242,7 +4242,7 @@ template<class T> void MeshGLTest::multiDrawIndexedSparseArrays() {
if(!Context::current().isExtensionSupported<Extensions::WEBGL::multi_draw_instanced_base_vertex_base_instance>())
CORRADE_SKIP(Extensions::WEBGL::multi_draw_instanced_base_vertex_base_instance::string() << "is not supported.");
#else
CORRADE_FAIL_IF(false, "Can't do base vertex here.");
CORRADE_FAIL("Can't do base vertex here.");
#endif
}
@ -4332,7 +4332,7 @@ void MeshGLTest::multiDrawIndexedViews() {
if(!Context::current().isExtensionSupported<Extensions::WEBGL::multi_draw_instanced_base_vertex_base_instance>())
CORRADE_SKIP(Extensions::WEBGL::multi_draw_instanced_base_vertex_base_instance::string() << "is not supported.");
#else
CORRADE_FAIL_IF(false, "Can't do base vertex here.");
CORRADE_FAIL("Can't do base vertex here.");
#endif
}
@ -4684,7 +4684,7 @@ void MeshGLTest::multiDrawInstanced() {
CORRADE_SKIP(GL::Extensions::WEBGL::multi_draw_instanced_base_vertex_base_instance::string() << "is not supported.");
#endif
#else
CORRADE_FAIL_IF(false, "Can't do base instance here.");
CORRADE_FAIL("Can't do base instance here.");
#endif
}
@ -4765,7 +4765,7 @@ void MeshGLTest::multiDrawInstancedSparseArrays() {
CORRADE_SKIP(GL::Extensions::WEBGL::multi_draw_instanced_base_vertex_base_instance::string() << "is not supported.");
#endif
#else
CORRADE_FAIL_IF(false, "Can't do base instance here.");
CORRADE_FAIL("Can't do base instance here.");
#endif
}
@ -4865,7 +4865,7 @@ template<class T> void MeshGLTest::multiDrawInstancedIndexed() {
CORRADE_SKIP(Extensions::WEBGL::multi_draw_instanced_base_vertex_base_instance::string() << "is not supported.");
#endif
#else
CORRADE_FAIL_IF(false, "Can't do base vertex or base instance here.");
CORRADE_FAIL("Can't do base vertex or base instance here.");
#endif
}
@ -4956,7 +4956,7 @@ template<class T> void MeshGLTest::multiDrawInstancedIndexedSparseArrays() {
CORRADE_SKIP(Extensions::WEBGL::multi_draw_instanced_base_vertex_base_instance::string() << "is not supported.");
#endif
#else
CORRADE_FAIL_IF(false, "Can't do base vertex or base instance here.");
CORRADE_FAIL("Can't do base vertex or base instance here.");
#endif
}

88
src/Magnum/ShaderTools/Test/AbstractConverterTest.cpp

@ -852,7 +852,7 @@ void AbstractConverterTest::validateFileAsDataNotFound() {
void doSetOutputFormat(Format, Containers::StringView) override {}
Containers::Pair<bool, Containers::String> doValidateData(Stage, Containers::ArrayView<const char>) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
} converter;
@ -1222,7 +1222,7 @@ void AbstractConverterTest::convertFileToFileThroughDataNotFound() {
void doSetOutputFormat(Format, Containers::StringView) override {}
Containers::Optional<Containers::Array<char>> doConvertDataToData(Stage, Containers::ArrayView<const char>) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
} converter;
@ -1389,7 +1389,7 @@ void AbstractConverterTest::convertFileToDataAsDataNotFound() {
void doSetOutputFormat(Format, Containers::StringView) override {}
Containers::Optional<Containers::Array<char>> doConvertDataToData(Stage, Containers::ArrayView<const char>) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
} converter;
@ -1847,7 +1847,7 @@ void AbstractConverterTest::linkFilesToFileThroughDataNotFound() {
void doSetOutputFormat(Format, Containers::StringView) override {}
Containers::Optional<Containers::Array<char>> doLinkDataToData(Containers::ArrayView<const Containers::Pair<Stage, Containers::ArrayView<const char>>>) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
} converter;
@ -2077,7 +2077,7 @@ void AbstractConverterTest::linkFilesToDataAsDataNotFound() {
void doSetOutputFormat(Format, Containers::StringView) override {}
Containers::Optional<Containers::Array<char>> doLinkDataToData(Containers::ArrayView<const Containers::Pair<Stage, Containers::ArrayView<const char>>>) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
} converter;
@ -2342,14 +2342,14 @@ void AbstractConverterTest::setInputFileCallbackValidateFileDirectly() {
}
Containers::Pair<bool, Containers::String> doValidateData(Stage, Containers::ArrayView<const char>) override {
CORRADE_VERIFY(!"this should not be reached");
CORRADE_FAIL("Uhis should not be reached");
return {};
}
} converter;
int a{};
converter.setInputFileCallback([](const std::string&, InputFileCallbackPolicy, void*) {
CORRADE_VERIFY(!"this should not be reached");
CORRADE_FAIL("This should not be reached");
return Containers::Optional<Containers::ArrayView<const char>>{};
}, &a);
@ -2397,7 +2397,7 @@ void AbstractConverterTest::setInputFileCallbackValidateFileThroughBaseImplement
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -2444,7 +2444,7 @@ void AbstractConverterTest::setInputFileCallbackValidateFileAsData() {
void doSetOutputFormat(Format, Containers::StringView) override {}
Containers::Pair<bool, Containers::String> doValidateFile(Stage, const Containers::StringView) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
@ -2470,7 +2470,7 @@ void AbstractConverterTest::setInputFileCallbackValidateFileAsData() {
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -2488,7 +2488,7 @@ void AbstractConverterTest::setInputFileCallbackValidateFileAsDataFailed() {
void doSetOutputFormat(Format, Containers::StringView) override {}
Containers::Pair<bool, Containers::String> doValidateFile(Stage, const Containers::StringView) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
} converter;
@ -2517,14 +2517,14 @@ void AbstractConverterTest::setInputFileCallbackConvertFileToFileDirectly() {
}
Containers::Optional<Containers::Array<char>> doConvertDataToData(Stage, Containers::ArrayView<const char>) override {
CORRADE_VERIFY(!"this should not be reached");
CORRADE_FAIL("This should not be reached");
return {};
}
} converter;
int a{};
converter.setInputFileCallback([](const std::string&, InputFileCallbackPolicy, void*) {
CORRADE_VERIFY(!"this should not be reached");
CORRADE_FAIL("This should not be reached");
return Containers::Optional<Containers::ArrayView<const char>>{};
}, &a);
@ -2574,7 +2574,7 @@ void AbstractConverterTest::setInputFileCallbackConvertFileToFileThroughBaseImpl
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -2627,7 +2627,7 @@ void AbstractConverterTest::setInputFileCallbackConvertFileToFileAsData() {
void doSetOutputFormat(Format, Containers::StringView) override {}
bool doConvertFileToFile(Stage, Containers::StringView, Containers::StringView) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
@ -2655,7 +2655,7 @@ void AbstractConverterTest::setInputFileCallbackConvertFileToFileAsData() {
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -2679,7 +2679,7 @@ void AbstractConverterTest::setInputFileCallbackConvertFileToFileAsDataFailed()
void doSetOutputFormat(Format, Containers::StringView) override {}
bool doConvertFileToFile(Stage, Containers::StringView, Containers::StringView) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
} converter;
@ -2704,7 +2704,7 @@ void AbstractConverterTest::setInputFileCallbackConvertFileToFileAsDataNotWritab
void doSetOutputFormat(Format, Containers::StringView) override {}
bool doConvertFileToFile(Stage, Containers::StringView, Containers::StringView) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
@ -2730,7 +2730,7 @@ void AbstractConverterTest::setInputFileCallbackConvertFileToFileAsDataNotWritab
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -2759,14 +2759,14 @@ void AbstractConverterTest::setInputFileCallbackConvertFileToDataDirectly() {
}
Containers::Optional<Containers::Array<char>> doConvertDataToData(Stage, Containers::ArrayView<const char>) override {
CORRADE_VERIFY(!"this should not be reached");
CORRADE_FAIL("This should not be reached");
return {};
}
} converter;
int a{};
converter.setInputFileCallback([](const std::string&, InputFileCallbackPolicy, void*) {
CORRADE_VERIFY(!"this should not be reached");
CORRADE_FAIL("This should not be reached");
return Containers::Optional<Containers::ArrayView<const char>>{};
}, &a);
@ -2820,7 +2820,7 @@ void AbstractConverterTest::setInputFileCallbackConvertFileToDataThroughBaseImpl
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -2871,7 +2871,7 @@ void AbstractConverterTest::setInputFileCallbackConvertFileToDataAsData() {
void doSetOutputFormat(Format, Containers::StringView) override {}
Containers::Optional<Containers::Array<char>> doConvertFileToData(Stage, Containers::StringView) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
@ -2899,7 +2899,7 @@ void AbstractConverterTest::setInputFileCallbackConvertFileToDataAsData() {
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -2921,7 +2921,7 @@ void AbstractConverterTest::setInputFileCallbackConvertFileToDataAsDataFailed()
void doSetOutputFormat(Format, Containers::StringView) override {}
Containers::Optional<Containers::Array<char>> doConvertFileToData(Stage, Containers::StringView) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
} converter;
@ -2950,14 +2950,14 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToFileDirectly() {
}
Containers::Optional<Containers::Array<char>> doConvertDataToData(Stage, Containers::ArrayView<const char>) override {
CORRADE_VERIFY(!"this should not be reached");
CORRADE_FAIL("This should not be reached");
return {};
}
} converter;
int a{};
converter.setInputFileCallback([](const std::string&, InputFileCallbackPolicy, void*) {
CORRADE_VERIFY(!"this should not be reached");
CORRADE_FAIL("This should not be reached");
return Containers::Optional<Containers::ArrayView<const char>>{};
}, &a);
@ -3015,7 +3015,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToFileThroughBaseImplem
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -3051,7 +3051,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToFileThroughBaseImplem
}
Containers::Optional<Containers::Array<char>> doLinkDataToData(Containers::ArrayView<const Containers::Pair<Stage, Containers::ArrayView<const char>>>) override {
CORRADE_VERIFY(!"this shouldn't be called");
CORRADE_FAIL("This shouldn't be called");
return {};
}
@ -3077,7 +3077,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToFileThroughBaseImplem
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -3105,7 +3105,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToFileAsData() {
void doSetOutputFormat(Format, Containers::StringView) override {}
bool doLinkFilesToFile(Containers::ArrayView<const Containers::Pair<Stage, Containers::StringView>>, Containers::StringView) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
@ -3138,7 +3138,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToFileAsData() {
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -3168,7 +3168,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToFileAsDataFailed() {
void doSetOutputFormat(Format, Containers::StringView) override {}
bool doLinkFilesToFile(Containers::ArrayView<const Containers::Pair<Stage, Containers::StringView>>, Containers::StringView) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
} converter;
@ -3192,7 +3192,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToFileAsDataFailed() {
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -3215,7 +3215,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToFileAsDataNotWritable
void doSetOutputFormat(Format, Containers::StringView) override {}
bool doLinkFilesToFile(Containers::ArrayView<const Containers::Pair<Stage, Containers::StringView>>, Containers::StringView) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
@ -3244,7 +3244,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToFileAsDataNotWritable
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -3279,14 +3279,14 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToDataDirectly() {
}
Containers::Optional<Containers::Array<char>> doLinkDataToData(Containers::ArrayView<const Containers::Pair<Stage, Containers::ArrayView<const char>>>) override {
CORRADE_VERIFY(!"this should not be reached");
CORRADE_FAIL("This should not be reached");
return {};
}
} converter;
int a{};
converter.setInputFileCallback([](const std::string&, InputFileCallbackPolicy, void*) {
CORRADE_VERIFY(!"this should not be reached");
CORRADE_FAIL("This should not be reached");
return Containers::Optional<Containers::ArrayView<const char>>{};
}, &a);
@ -3348,7 +3348,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToDataThroughBaseImplem
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -3403,7 +3403,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToDataThroughBaseImplem
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -3431,7 +3431,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToDataAsData() {
void doSetOutputFormat(Format, Containers::StringView) override {}
Containers::Optional<Containers::Array<char>> doLinkFilesToData(Containers::ArrayView<const Containers::Pair<Stage, Containers::StringView>>) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
@ -3464,7 +3464,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToDataAsData() {
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);
@ -3492,7 +3492,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToDataAsDataFailed() {
void doSetOutputFormat(Format, Containers::StringView) override {}
Containers::Optional<Containers::Array<char>> doLinkFilesToData(Containers::ArrayView<const Containers::Pair<Stage, Containers::StringView>>) override {
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}
} converter;
@ -3516,7 +3516,7 @@ void AbstractConverterTest::setInputFileCallbackLinkFilesToDataAsDataFailed() {
return {};
}
CORRADE_VERIFY(!"this shouldn't be reached");
CORRADE_FAIL("This shouldn't be reached");
return {};
}, state);

2
src/Magnum/Text/Test/AbstractFontConverterTest.cpp

@ -1002,7 +1002,7 @@ void AbstractFontConverterTest::importGlyphCacheFromFileAsSingleDataNotFound() {
}
Containers::Pointer<AbstractGlyphCache> doImportGlyphCacheFromSingleData(const Containers::ArrayView<const char>) const override {
CORRADE_VERIFY(!"this shouldn't get reached");
CORRADE_FAIL("This shouldn't get reached");
return {};
}
} converter;

40
src/Magnum/Trade/Test/AbstractSceneConverterTest.cpp

@ -1348,7 +1348,7 @@ void AbstractSceneConverterTest::convertMeshToDataThroughBatch() {
}
Containers::Optional<Containers::Array<char>> doConvertToData(const Magnum::Trade::MeshData&) override {
CORRADE_FAIL_IF(true, "doConvertToData() should not be called");
CORRADE_FAIL("doConvertToData() should not be called");
return {};
}
@ -1391,7 +1391,7 @@ void AbstractSceneConverterTest::convertMeshToDataThroughBatchAddFailed() {
}
Containers::Optional<Containers::Array<char>> doEndData() override {
CORRADE_FAIL_IF(true, "doEndData() shouldn't be called");
CORRADE_FAIL("doEndData() shouldn't be called");
return {};
}
} converter;
@ -1606,7 +1606,7 @@ void AbstractSceneConverterTest::convertMeshToFileThroughBatch() {
}
bool doConvertToFile(const Trade::MeshData&, Containers::StringView) override {
CORRADE_FAIL_IF(true, "doConvertToFile() should not be called");
CORRADE_FAIL("doConvertToFile() should not be called");
return {};
}
@ -1656,7 +1656,7 @@ void AbstractSceneConverterTest::convertMeshToFileThroughBatchAddFailed() {
}
bool doEndFile(Containers::StringView) override {
CORRADE_FAIL_IF(true, "doEndFile() shouldn't be called");
CORRADE_FAIL("doEndFile() shouldn't be called");
return {};
}
} converter;
@ -3383,17 +3383,17 @@ void AbstractSceneConverterTest::addMeshThroughConvertMesh() {
}
bool doBegin() override {
CORRADE_FAIL_IF(true, "doBegin() should not be called");
CORRADE_FAIL("doBegin() should not be called");
return {};
}
Containers::Pointer<AbstractImporter> doEnd() override {
CORRADE_FAIL_IF(true, "doEnd() should not be called");
CORRADE_FAIL("doEnd() should not be called");
return {};
}
bool doAdd(UnsignedInt, const Trade::MeshData&, Containers::StringView) override {
CORRADE_FAIL_IF(true, "doAdd() should not be called");
CORRADE_FAIL("doAdd() should not be called");
return {};
}
} converter;
@ -3524,17 +3524,17 @@ void AbstractSceneConverterTest::addMeshThroughConvertMeshToData() {
}
bool doBeginData() override {
CORRADE_FAIL_IF(true, "doBeginData() should not be called");
CORRADE_FAIL("doBeginData() should not be called");
return {};
}
Containers::Optional<Containers::Array<char>> doEndData() override {
CORRADE_FAIL_IF(true, "doEndData() should not be called");
CORRADE_FAIL("doEndData() should not be called");
return {};
}
bool doAdd(UnsignedInt, const Trade::MeshData&, Containers::StringView) override {
CORRADE_FAIL_IF(true, "doAdd() should not be called");
CORRADE_FAIL("doAdd() should not be called");
return {};
}
} converter;
@ -3638,17 +3638,17 @@ void AbstractSceneConverterTest::addMeshThroughConvertMeshToFile() {
}
bool doBeginFile(Containers::StringView) override {
CORRADE_FAIL_IF(true, "doBeginFile() should not be called");
CORRADE_FAIL("doBeginFile() should not be called");
return {};
}
bool doEndFile(Containers::StringView) override {
CORRADE_FAIL_IF(true, "doEndFile() should not be called");
CORRADE_FAIL("doEndFile() should not be called");
return {};
}
bool doAdd(UnsignedInt, const Trade::MeshData&, Containers::StringView) override {
CORRADE_FAIL_IF(true, "doAdd() should not be called");
CORRADE_FAIL("doAdd() should not be called");
return {};
}
} converter;
@ -3688,27 +3688,27 @@ void AbstractSceneConverterTest::addMeshThroughConvertMeshToFileThroughData() {
}
bool doBeginData() override {
CORRADE_FAIL_IF(true, "doBeginData() should not be called");
CORRADE_FAIL("doBeginData() should not be called");
return {};
}
Containers::Optional<Containers::Array<char>> doEndData() override {
CORRADE_FAIL_IF(true, "doEndData() should not be called");
CORRADE_FAIL("doEndData() should not be called");
return {};
}
bool doBeginFile(Containers::StringView) override {
CORRADE_FAIL_IF(true, "doBeginFile() should not be called");
CORRADE_FAIL("doBeginFile() should not be called");
return {};
}
bool doEndFile(Containers::StringView) override {
CORRADE_FAIL_IF(true, "doEndFile() should not be called");
CORRADE_FAIL("doEndFile() should not be called");
return {};
}
bool doAdd(UnsignedInt, const Trade::MeshData&, Containers::StringView) override {
CORRADE_FAIL_IF(true, "doAdd() should not be called");
CORRADE_FAIL("doAdd() should not be called");
return {};
}
} converter;
@ -6113,7 +6113,7 @@ void AbstractSceneConverterTest::addImporterContentsCustomSceneFields() {
Containers::String doSceneFieldName(UnsignedInt name) override {
if(name == 34977) return "OffsetSmall";
if(name == 5266) return "ValueData";
CORRADE_FAIL_IF(true, "This should not be reached");
CORRADE_FAIL("This should not be reached");
CORRADE_INTERNAL_ASSERT_UNREACHABLE();
}
} importer;
@ -6178,7 +6178,7 @@ void AbstractSceneConverterTest::addImporterContentsCustomMeshAttributes() {
Containers::String doMeshAttributeName(UnsignedShort name) override {
if(name == 31977) return "OffsetSmall";
if(name == 5266) return "ValueData";
CORRADE_FAIL_IF(true, "This should not be reached");
CORRADE_FAIL("This should not be reached");
CORRADE_INTERNAL_ASSERT_UNREACHABLE();
}
} importer;

Loading…
Cancel
Save