|
|
|
@ -27,6 +27,7 @@ |
|
|
|
#include <set> |
|
|
|
#include <set> |
|
|
|
#include <sstream> |
|
|
|
#include <sstream> |
|
|
|
#include <Corrade/Containers/ArrayView.h> |
|
|
|
#include <Corrade/Containers/ArrayView.h> |
|
|
|
|
|
|
|
#include <Corrade/Containers/StringView.h> |
|
|
|
#include <Corrade/TestSuite/Tester.h> |
|
|
|
#include <Corrade/TestSuite/Tester.h> |
|
|
|
#include <Corrade/Utility/DebugStl.h> |
|
|
|
#include <Corrade/Utility/DebugStl.h> |
|
|
|
|
|
|
|
|
|
|
|
@ -84,8 +85,13 @@ void ContextTest::extensions() { |
|
|
|
CORRADE_FAIL_IF(e.index() >= Implementation::ExtensionCount, |
|
|
|
CORRADE_FAIL_IF(e.index() >= Implementation::ExtensionCount, |
|
|
|
"Index" << e.index() << "larger than" << Implementation::ExtensionCount); |
|
|
|
"Index" << e.index() << "larger than" << Implementation::ExtensionCount); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Have to use Containers::StringView to avoid passing null char* to
|
|
|
|
|
|
|
|
std::cout (which crashes on Mac due to strlen being called on it) |
|
|
|
|
|
|
|
because the message is actually printed sooner than the condition |
|
|
|
|
|
|
|
gets tested! */ |
|
|
|
|
|
|
|
/** @todo clean up once fixed in Corrade */ |
|
|
|
CORRADE_FAIL_IF(used[e.index()], |
|
|
|
CORRADE_FAIL_IF(used[e.index()], |
|
|
|
"Index" << e.index() << "already used by" << used[e.index()]); |
|
|
|
"Index" << e.index() << "already used by" << Containers::StringView{used[e.index()]}); |
|
|
|
|
|
|
|
|
|
|
|
used[e.index()] = e.string(); |
|
|
|
used[e.index()] = e.string(); |
|
|
|
CORRADE_FAIL_IF(!unique.insert(e.string()).second, |
|
|
|
CORRADE_FAIL_IF(!unique.insert(e.string()).second, |
|
|
|
|