OSDN Git Service

debugger: work on manual tests
authorhjk <qtc-committer@nokia.com>
Wed, 24 Aug 2011 14:23:10 +0000 (16:23 +0200)
committerhjk <qthjk@ovi.com>
Wed, 24 Aug 2011 14:31:06 +0000 (16:31 +0200)
Change-Id: Ied0486b79661c7587211128be047a419351e00f3
Reviewed-on: http://codereview.qt.nokia.com/3515
Reviewed-by: hjk <qthjk@ovi.com>
tests/manual/debugger/simple/simple_test_app.cpp

index 72e0ec9..d1aa977 100644 (file)
 **
 **************************************************************************/
 
-//#include <complex>
+////////////////  Some global configuration below ////////////////
+
+
+// The following defines can be used to steer the kind of tests that
+// can be done.
+
+// With USE_AUTOBREAK, the debugger will stop automatically on all
+// lines containing the BREAK_HERE macro. This should be enabled
+// during manual testing.
+// Default: 1
+#define USE_AUTOBREAK 1
+
+// With USE_PRIVATE tests that require private headers are enabled.
+// Default: 1
+#define USE_PRIVATE 1
+
+// With USE_BOOST tests of boost data dumpers are enabled. You need
+// some boost headers installed.
+// Default: 0
+#define USE_BOOST 0
+
+// With USE_EGIEN tests of data dumpers for the "Eigen" library are
+// enabled. You need some eigen headers installed.
+// Default: 0
+#define USE_EIGEN 0
+
+
+////////////// No further global configuration below ////////////////
+
 
 void dummyStatement(...) {}
 
@@ -62,6 +90,8 @@ void dummyStatement(...) {}
 #include <QtGui/QColor>
 #include <QtGui/QFont>
 #include <QtGui/QLabel>
+
+
 //#include <QtGui/private/qfixed_p.h>
 #include <QtGui/QPainter>
 #include <QtGui/QPainterPath>
@@ -89,18 +119,8 @@ void dummyStatement(...) {}
 
 #include <stdarg.h>
 
-// For the full manual test, change the '#if 0' to '#if 1'
-#if 1
-#define BREAK_HERE /**/
-#else
-#define BREAK_HERE asm("int $3; mov %eax, %eax")
-#endif
-
 #include "../simple/deep/deep/simple_test_app.h"
 
-#define USE_PRIVATE 1
-//#define USE_BOOST 1
-//#define USE_EIGEN 1
 
 #if USE_BOOST
 #include <boost/optional.hpp>
@@ -132,6 +152,16 @@ void dummyStatement(...) {}
 #include <stddef.h>
 #endif
 
+#if USE_AUTOBREAK
+#   if Q_CC_MSVC
+#       define BREAK_HERE __asm { int 3 }; __asm { mov eax, eax }
+#   else
+#       define BREAK_HERE asm("int $3; mov %eax, %eax")
+#   endif
+#else
+#   define BREAK_HERE /**/
+#endif
+
 namespace multibp {
 
     template <typename T> class Vector