Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
cdd1596f
Commit
cdd1596f
authored
May 07, 2009
by
Oswald Buddenhagen
Browse files
nicer QTC_ASSERT output
parent
974388c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/utils/qtcassert.h
View file @
cdd1596f
...
...
@@ -32,11 +32,14 @@
#include
<QtCore/QDebug>
#define QTC_ASSERT_STRINGIFY_INTERNAL(x) #x
#define QTC_ASSERT_STRINGIFY(x) QTC_ASSERT_STRINGIFY_INTERNAL(x)
// we do not use the 'do {...} while (0)' idiom here to be able to use
// 'break' and 'continue' as 'actions'.
#define QTC_ASSERT(cond, action) \
if(cond){}else{qDebug()<<"ASSERTION
"<<
#cond
<<"
FAILED
"<<
__FILE__
<<
__LINE__;action;}
if(cond){}else{qDebug()<<"ASSERTION
"
#cond
"
FAILED
AT "
__FILE__
":" QTC_ASSERT_STRINGIFY(
__LINE__
)
;action;}
#endif // QTC_ASSERT_H
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment