diff --git a/src/Magnum/Audio/Test/ContextALTest.cpp b/src/Magnum/Audio/Test/ContextALTest.cpp index b168e7c55..4f5a44ece 100644 --- a/src/Magnum/Audio/Test/ContextALTest.cpp +++ b/src/Magnum/Audio/Test/ContextALTest.cpp @@ -24,6 +24,8 @@ DEALINGS IN THE SOFTWARE. */ +#include +#include #include #include "Magnum/Audio/Extensions.h" @@ -37,15 +39,19 @@ struct ContextALTest: TestSuite::Tester { void construct(); void constructMove(); + void quietLog(); + void extensionsString(); void isExtensionEnabled(); }; ContextALTest::ContextALTest() { addTests({&ContextALTest::construct, - &ContextALTest::constructMove, + &ContextALTest::constructMove}); + + addInstancedTests({&ContextALTest::quietLog}, 2); - &ContextALTest::extensionsString, + addTests({&ContextALTest::extensionsString, &ContextALTest::isExtensionEnabled}); } @@ -73,6 +79,17 @@ void ContextALTest::constructMove() { CORRADE_VERIFY(!Context::hasCurrent()); } +void ContextALTest::quietLog() { + setTestCaseDescription(testCaseInstanceId() ? "true" : "false"); + + const char* argv[] = { "", "--magnum-log", testCaseInstanceId() ? "quiet" : "default" }; + + std::ostringstream out; + Debug redirectOutput{&out}; + Context context{Containers::arraySize(argv), argv}; + CORRADE_COMPARE(out.str().empty(), bool(testCaseInstanceId())); +} + void ContextALTest::extensionsString() { Context context;