diff --git a/src/Magnum/Audio/Test/ContextTest.cpp b/src/Magnum/Audio/Test/ContextTest.cpp index 1eb0138f6..c4b20b734 100644 --- a/src/Magnum/Audio/Test/ContextTest.cpp +++ b/src/Magnum/Audio/Test/ContextTest.cpp @@ -24,6 +24,7 @@ DEALINGS IN THE SOFTWARE. */ +#include #include #include #include @@ -70,7 +71,9 @@ void ContextTest::constructCopyMove() { void ContextTest::extensions() { const char* used[Implementation::ExtensionCount]{}; - /* Check that all extension indices are unique */ + std::set unique; + + /* Check that all extension indices are unique and are listed just once */ for(const Extension& e: Extension::extensions()) { if(e.index() >= Implementation::ExtensionCount) { Error{} << "Index" << e.index() << "used by" << e.string() @@ -85,6 +88,10 @@ void ContextTest::extensions() { } used[e.index()] = e.string(); + if(!unique.insert(e.string()).second) { + Error{} << "Extension" << e.string() << "listed more than once"; + CORRADE_VERIFY(false); + } } CORRADE_VERIFY(true);