diff --git a/src/Magnum/Audio/Test/ContextALTest.cpp b/src/Magnum/Audio/Test/ContextALTest.cpp index 18cc72575..7ec53567c 100644 --- a/src/Magnum/Audio/Test/ContextALTest.cpp +++ b/src/Magnum/Audio/Test/ContextALTest.cpp @@ -39,6 +39,7 @@ struct ContextALTest: TestSuite::Tester { void constructDefault(); void constructConfiguration(); + void constructDeviceNotFound(); void constructMove(); void quietLog(); @@ -56,6 +57,7 @@ ContextALTest::ContextALTest(): { addTests({&ContextALTest::constructDefault, &ContextALTest::constructConfiguration, + &ContextALTest::constructDeviceNotFound, &ContextALTest::constructMove}); addInstancedTests({&ContextALTest::quietLog}, 2); @@ -130,6 +132,19 @@ void ContextALTest::constructConfiguration() { CORRADE_VERIFY(!Context::hasCurrent()); } +void ContextALTest::constructDeviceNotFound() { + CORRADE_VERIFY(!Context::hasCurrent()); + + { + Context context{NoCreate, arguments().first, arguments().second}; + CORRADE_VERIFY(!context.tryCreate(Context::Configuration{} + .setDeviceSpecifier("hello this definitely doesn't exist"))); + CORRADE_VERIFY(!Context::hasCurrent()); + } + + CORRADE_VERIFY(!Context::hasCurrent()); +} + void ContextALTest::constructMove() { Context context; CORRADE_COMPARE(&Context::current(), &context);