diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-10-01 08:05:58 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-10-01 08:05:58 +0000 |
commit | 4ca5c503bc36f0300bb3f3ec1577ed41df098ab2 (patch) | |
tree | 0e6a4a4fddafd0cafd18601f5345e371c7fe1f99 /registry/test/regdiagnose.h | |
parent | c490a9f0684dd5cc7efd897afbf70e2f73444f72 (diff) |
CWS-TOOLING: integrate CWS jsc311
Diffstat (limited to 'registry/test/regdiagnose.h')
-rw-r--r-- | registry/test/regdiagnose.h | 47 |
1 files changed, 47 insertions, 0 deletions
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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#ifndef REG_DIAGNOSE_H +#define REG_DIAGNOSE_H + +#include <osl/diagnose.h> + +#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 |