Bug 48391 - Remove TEST_ENSHURE
Summary: Remove TEST_ENSHURE
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Gábor Stefanik
URL:
Whiteboard: target:3.6.0
Keywords: difficultyBeginner, easyHack, topicCleanup
Depends on:
Blocks:
 
Reported: 2012-04-06 09:47 UTC by Jan Holesovsky
Modified: 2015-12-16 05:13 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Holesovsky 2012-04-06 09:47:08 UTC
git grep TEST_ENSHURE

gives quite some uses of this misspelled macro that is defined here and there as:

#if OSL_DEBUG_LEVEL > 0
#define TEST_ENSHURE(c, m)   OSL_ENSURE(c, m)
#else
#define TEST_ENSHURE(c, m)   OSL_VERIFY(c)
#endif

These definitions should be removed, and most of the uses of TEST_ENSHURE should be changed directly to OSL_ENSURE(), like:

-    TEST_ENSHURE( xSMgr.is(), "excomp error 0" );
+    OSL_ENSURE( xSMgr.is(), "excomp error 0" );

There is a small catch - OSL_VERIFY() evaluates the condition _always_, regardless of the debug level, so in case the condition is something more advanced than xSMgr.is(), you might need to use OSL_VERIFY() instead of OSL_ENSURE().  If in doubt, please consult the libreoffice@lists.freedesktop.org mailing list :-)
Comment 1 Gábor Stefanik 2012-05-02 18:04:00 UTC
Working on this one.
Comment 2 Not Assigned 2012-05-07 01:36:32 UTC
Gabor Stefanik committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=789813aa8dcc19f8d576ca651ad8365d4ee6d703

fdo#48391: Remove TEST_ENSHURE
Comment 3 Robinson Tryon (qubit) 2015-12-16 05:13:37 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner TopicCleanup  )
[NinjaEdit]