// gcc errors out if we |try ... catch| with -fno-exceptions, but we // can still test on windows #ifdef _MSC_VER // C4530 will be generated whenever try...catch is used without // enabling exceptions. We know we don't enbale exceptions. # pragma warning(disable : 4530) # define TRYtry # define CATCH(e) catch (e) #else # define TRY # define CATCH(e) if (0) #endif
#include"gtest/gtest.h"
#include"mozilla/gtest/MozHelpers.h"
void ShouldAbort() {
ZERO_GDB_SLEEP();
mozilla::gtest::DisableCrashReporter();
std::vector<int> v;
TRY { // v.at(1) on empty v should abort; NOT throw an exception
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.