From 4ca5c503bc36f0300bb3f3ec1577ed41df098ab2 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Wed, 1 Oct 2008 08:05:58 +0000 Subject: CWS-TOOLING: integrate CWS jsc311 --- registry/test/regdiagnose.h | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 registry/test/regdiagnose.h (limited to 'registry/test/regdiagnose.h') diff --git a/registry/test/regdiagnose.h b/registry/test/regdiagnose.h new file mode 100644 index 000000000000..ffbca265bbb6 --- /dev/null +++ b/registry/test/regdiagnose.h @@ -0,0 +1,47 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: regdiagnose.h,v $ + * $Revision: 1.1.2.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#ifndef REG_DIAGNOSE_H +#define REG_DIAGNOSE_H + +#include + +#define REG_ENSURE(c, m) _REG_ENSURE(c, OSL_THIS_FILE, __LINE__, m) + +#define _REG_ENSURE(c, f, l, m) \ + do \ + { \ + if (!(c) && _OSL_GLOBAL osl_assertFailedLine(f, l, m)) \ + _OSL_GLOBAL osl_breakDebug(); \ + } while (0) + + +#endif // REG_DIAGNOSE_H -- cgit