debugger: make manual tests 'auto-break' on demand

Change-Id: Iaec13fe6634230ca3df5f6fd92470a72ce32c266
Reviewed-on: http://codereview.qt.nokia.com/3494
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2011-08-24 13:51:49 +02:00
committed by hjk
parent 051545a499
commit 38b5cafe79

View File

@@ -32,12 +32,8 @@
//#include <complex> //#include <complex>
//template <typename T> class B; B foo() {}
void dummyStatement(...) {} void dummyStatement(...) {}
#include "../simple/deep/deep/simple_test_app.h"
#include <QtCore/QDebug> #include <QtCore/QDebug>
#include <QtCore/QDateTime> #include <QtCore/QDateTime>
#include <QtCore/QDir> #include <QtCore/QDir>
@@ -93,6 +89,15 @@ void dummyStatement(...) {}
#include <stdarg.h> #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_PRIVATE 1
//#define USE_BOOST 1 //#define USE_BOOST 1
//#define USE_EIGEN 1 //#define USE_EIGEN 1
@@ -134,7 +139,9 @@ namespace multibp {
public: public:
explicit Vector(int size) explicit Vector(int size)
: m_size(size), m_data(new T[size]) : m_size(size), m_data(new T[size])
{} // <=== Break here. {
BREAK_HERE;
}
~Vector() { delete [] m_data; } ~Vector() { delete [] m_data; }
int size() const { return m_size; } int size() const { return m_size; }
private: private:
@@ -348,7 +355,7 @@ namespace anon {
a.i = 2; a.i = 2;
a.i = 3; a.i = 3;
Something s; Something s;
// <== Break here. BREAK_HERE;
// Step. // Step.
s.foo(); s.foo();
dummyStatement(&a, &s); dummyStatement(&a, &s);
@@ -363,7 +370,7 @@ namespace qbytearray {
void testQByteArray1() void testQByteArray1()
{ {
QByteArray ba; QByteArray ba;
// <== Break here. BREAK_HERE;
ba += "Hello"; ba += "Hello";
ba += '"'; ba += '"';
ba += "World"; ba += "World";
@@ -378,7 +385,7 @@ namespace qbytearray {
QByteArray ba; QByteArray ba;
for (int i = 256; --i >= 0; ) for (int i = 256; --i >= 0; )
ba.append(char(i)); ba.append(char(i));
// <== Break here. BREAK_HERE;
QString s(10000, 'x'); QString s(10000, 'x');
std::string ss(10000, 'c'); std::string ss(10000, 'c');
dummyStatement(&ba, &ss, &s); dummyStatement(&ba, &ss, &s);
@@ -392,7 +399,7 @@ namespace qbytearray {
QByteArray buf1(str1); QByteArray buf1(str1);
QByteArray buf2(str2); QByteArray buf2(str2);
QByteArray buf3(str3); QByteArray buf3(str3);
// <== Break here. BREAK_HERE;
dummyStatement(&buf1, &buf2, &buf3); dummyStatement(&buf1, &buf2, &buf3);
} }
@@ -434,7 +441,7 @@ namespace qdatetime {
void testQDate() void testQDate()
{ {
QDate date; QDate date;
// <== Break here. BREAK_HERE;
// Step, check display. // Step, check display.
date = QDate::currentDate(); date = QDate::currentDate();
date = date.addDays(5); date = date.addDays(5);
@@ -445,7 +452,7 @@ namespace qdatetime {
void testQTime() void testQTime()
{ {
QTime time; QTime time;
// <== Break here. BREAK_HERE;
// Step, check display. // Step, check display.
time = QTime::currentTime(); time = QTime::currentTime();
time = time.addSecs(5); time = time.addSecs(5);
@@ -456,7 +463,7 @@ namespace qdatetime {
void testQDateTime() void testQDateTime()
{ {
QDateTime date; QDateTime date;
// <== Break here. BREAK_HERE;
// Step, check display. // Step, check display.
date = QDateTime::currentDateTime(); date = QDateTime::currentDateTime();
date = date.addSecs(5); date = date.addSecs(5);
@@ -506,7 +513,7 @@ namespace qhostaddress {
{ {
QHostAddress ha1(129u * 256u * 256u * 256u + 130u); QHostAddress ha1(129u * 256u * 256u * 256u + 130u);
QHostAddress ha2("127.0.0.1"); QHostAddress ha2("127.0.0.1");
// <== Break here. BREAK_HERE;
// Check ha1 and ha2 look correct. // Check ha1 and ha2 look correct.
dummyStatement(&ha1, &ha2); dummyStatement(&ha1, &ha2);
} }
@@ -842,7 +849,7 @@ namespace qobject {
QObject::connect(&child, SIGNAL(destroyed()), qApp, SLOT(quit())); QObject::connect(&child, SIGNAL(destroyed()), qApp, SLOT(quit()));
QObject::disconnect(&child, SIGNAL(destroyed()), qApp, SLOT(quit())); QObject::disconnect(&child, SIGNAL(destroyed()), qApp, SLOT(quit()));
child.setObjectName("A renamed Child"); child.setObjectName("A renamed Child");
// <=== Break here. BREAK_HERE;
// Expand all. // Expand all.
dummyStatement(&parent, &child); dummyStatement(&parent, &child);
} }
@@ -920,14 +927,6 @@ namespace qobject {
obs.append(&app); obs.append(&app);
ob1.setObjectName("A Subobject"); ob1.setObjectName("A Subobject");
#endif #endif
#if 1
QString str = QString::fromUtf8("XXXXXXXXXXXXXXyyXXX ö");
QLabel l(str);
l.setObjectName("Some Label");
l.show();
//app.exec();
#endif
} }
class Sender : public QObject class Sender : public QObject
@@ -1052,7 +1051,7 @@ namespace qobject {
// are displayed properly. // are displayed properly.
#if USE_PRIVATE #if USE_PRIVATE
DerivedObject ob; DerivedObject ob;
// <=== Break here. BREAK_HERE;
// expand ob and ob.properties // expand ob and ob.properties
// step, and check whether x gets updated. // step, and check whether x gets updated.
ob.setX(23); ob.setX(23);
@@ -1092,7 +1091,7 @@ namespace qregexp {
{ {
// Works with Python dumpers only. // Works with Python dumpers only.
QRegExp re(QString("a(.*)b(.*)c")); QRegExp re(QString("a(.*)b(.*)c"));
// <=== Break here. BREAK_HERE;
// Step over until end, check display looks ok. // Step over until end, check display looks ok.
QString str1 = "a1121b344c"; QString str1 = "a1121b344c";
QString str2 = "Xa1121b344c"; QString str2 = "Xa1121b344c";
@@ -1109,7 +1108,7 @@ namespace qrect {
void testQPoint() void testQPoint()
{ {
QPoint s; QPoint s;
// <=== Break here. BREAK_HERE;
// Step over, check display looks sane. // Step over, check display looks sane.
s = QPoint(100, 200); s = QPoint(100, 200);
dummyStatement(&s); dummyStatement(&s);
@@ -1118,7 +1117,7 @@ namespace qrect {
void testQPointF() void testQPointF()
{ {
QPointF s; QPointF s;
// <=== Break here. BREAK_HERE;
// Step over, check display looks sane. // Step over, check display looks sane.
s = QPointF(100, 200); s = QPointF(100, 200);
dummyStatement(&s); dummyStatement(&s);
@@ -1127,7 +1126,7 @@ namespace qrect {
void testQRect() void testQRect()
{ {
QRect rect; QRect rect;
// <=== Break here. BREAK_HERE;
// Step over, check display looks sane. // Step over, check display looks sane.
rect = QRect(100, 100, 200, 200); rect = QRect(100, 100, 200, 200);
dummyStatement(&rect); dummyStatement(&rect);
@@ -1136,7 +1135,7 @@ namespace qrect {
void testQRectF() void testQRectF()
{ {
QRectF rect; QRectF rect;
// <=== Break here. BREAK_HERE;
// Step over, check display looks sane. // Step over, check display looks sane.
rect = QRectF(100, 100, 200, 200); rect = QRectF(100, 100, 200, 200);
dummyStatement(&rect); dummyStatement(&rect);
@@ -1145,7 +1144,7 @@ namespace qrect {
void testQSize() void testQSize()
{ {
QSize s; QSize s;
// <=== Break here. BREAK_HERE;
// Step over, check display looks sane. // Step over, check display looks sane.
s = QSize(100, 200); s = QSize(100, 200);
dummyStatement(&s); dummyStatement(&s);
@@ -1154,7 +1153,7 @@ namespace qrect {
void testQSizeF() void testQSizeF()
{ {
QSizeF s; QSizeF s;
// <=== Break here. BREAK_HERE;
// Step over, check display looks sane. // Step over, check display looks sane.
s = QSizeF(100, 200); s = QSizeF(100, 200);
dummyStatement(&s); dummyStatement(&s);
@@ -1179,7 +1178,7 @@ namespace qregion {
{ {
// Works with Python dumpers only. // Works with Python dumpers only.
QRegion region; QRegion region;
// <=== Break here. BREAK_HERE;
// Step over until end, check display looks sane. // Step over until end, check display looks sane.
region += QRect(100, 100, 200, 200); region += QRect(100, 100, 200, 200);
region += QRect(300, 300, 400, 500); region += QRect(300, 300, 400, 500);
@@ -1219,6 +1218,21 @@ void testPlugin()
} }
} }
namespace application {
void testApplicationStart(int &argc, char *argv[])
{
QApplication app(argc, argv);
QString str = QString::fromUtf8("XXXXXXXXXXXXXXyyXXX ö");
QLabel l(str);
l.setObjectName("Some Label");
l.show();
app.exec();
}
} // namespace application
void testQSet() void testQSet()
{ {
QSet<int> hgg0; QSet<int> hgg0;
@@ -1313,7 +1327,7 @@ namespace qxml {
atts.append("name1", "uri1", "localPart1", "value1"); atts.append("name1", "uri1", "localPart1", "value1");
atts.append("name2", "uri2", "localPart2", "value2"); atts.append("name2", "uri2", "localPart2", "value2");
atts.append("name3", "uri3", "localPart3", "value3"); atts.append("name3", "uri3", "localPart3", "value3");
// <=== Break here. BREAK_HERE;
// Expand, check that attributes are displayed. // Expand, check that attributes are displayed.
dummyStatement(); dummyStatement();
} }
@@ -1495,7 +1509,7 @@ namespace stdstack {
{ {
// This does not work with the compiled dumpers. // This does not work with the compiled dumpers.
std::stack<int *> plist1; std::stack<int *> plist1;
// <=== Break here. BREAK_HERE;
plist1.push(new int(1)); plist1.push(new int(1));
plist1.push(0); plist1.push(0);
plist1.push(new int(2)); plist1.push(new int(2));
@@ -1508,7 +1522,7 @@ namespace stdstack {
void testStdStack2() void testStdStack2()
{ {
std::stack<int> flist2; std::stack<int> flist2;
// <=== Break here. BREAK_HERE;
flist2.push(1); flist2.push(1);
flist2.push(2); flist2.push(2);
dummyStatement(&flist2); dummyStatement(&flist2);
@@ -1517,7 +1531,7 @@ namespace stdstack {
void testStdStack3() void testStdStack3()
{ {
std::stack<Foo *> plist; std::stack<Foo *> plist;
// <=== Break here. BREAK_HERE;
plist.push(new Foo(1)); plist.push(new Foo(1));
plist.push(new Foo(2)); plist.push(new Foo(2));
dummyStatement(&plist); dummyStatement(&plist);
@@ -1526,7 +1540,7 @@ namespace stdstack {
void testStdStack4() void testStdStack4()
{ {
std::stack<Foo> flist; std::stack<Foo> flist;
// <=== Break here. BREAK_HERE;
flist.push(1); flist.push(1);
flist.push(2); flist.push(2);
dummyStatement(&flist); dummyStatement(&flist);
@@ -1549,7 +1563,7 @@ namespace stdstring {
{ {
std::string str; std::string str;
std::wstring wstr; std::wstring wstr;
// <=== Break here. BREAK_HERE;
str += "b"; str += "b";
wstr += wchar_t('e'); wstr += wchar_t('e');
str += "d"; str += "d";
@@ -1568,7 +1582,7 @@ namespace stdstring {
{ {
std::string str = "foo"; std::string str = "foo";
QList<std::string> l; QList<std::string> l;
// <=== Break here. BREAK_HERE;
l.push_back(str); l.push_back(str);
l.push_back(str); l.push_back(str);
l.push_back(str); l.push_back(str);
@@ -1580,7 +1594,7 @@ namespace stdstring {
{ {
std::string str = "foo"; std::string str = "foo";
std::vector<std::string> v; std::vector<std::string> v;
// <=== Break here. BREAK_HERE;
v.push_back(str); v.push_back(str);
v.push_back(str); v.push_back(str);
v.push_back(str); v.push_back(str);
@@ -1603,7 +1617,7 @@ namespace stdvector {
void testStdVector1() void testStdVector1()
{ {
std::vector<int *> v; std::vector<int *> v;
// <=== Break here. BREAK_HERE;
// Expand. Step. Check display. // Expand. Step. Check display.
v.push_back(new int(1)); v.push_back(new int(1));
v.push_back(0); v.push_back(0);
@@ -1618,7 +1632,7 @@ namespace stdvector {
v.push_back(2); v.push_back(2);
v.push_back(3); v.push_back(3);
v.push_back(4); v.push_back(4);
// <=== Break here. BREAK_HERE;
dummyStatement(&v); dummyStatement(&v);
} }
@@ -1629,7 +1643,7 @@ namespace stdvector {
v.push_back(new Foo(1)); v.push_back(new Foo(1));
v.push_back(0); v.push_back(0);
v.push_back(new Foo(2)); v.push_back(new Foo(2));
// <=== Break here. BREAK_HERE;
// Expand v.[0].x // Expand v.[0].x
dummyStatement(&v); dummyStatement(&v);
} }
@@ -1641,7 +1655,7 @@ namespace stdvector {
flist.push_back(2); flist.push_back(2);
flist.push_back(3); flist.push_back(3);
flist.push_back(4); flist.push_back(4);
// <=== Break here. BREAK_HERE;
// Expand v.[0].x // Expand v.[0].x
dummyStatement(&flist); dummyStatement(&flist);
} }
@@ -1654,7 +1668,7 @@ namespace stdvector {
vec.push_back(false); vec.push_back(false);
vec.push_back(true); vec.push_back(true);
vec.push_back(false); vec.push_back(false);
// <=== Break here. BREAK_HERE;
dummyStatement(&vec); dummyStatement(&vec);
} }
@@ -1667,7 +1681,7 @@ namespace stdvector {
list.push_back(45); list.push_back(45);
vector.push_back(new std::list<int>(list)); vector.push_back(new std::list<int>(list));
vector.push_back(0); vector.push_back(0);
// <=== Break here. BREAK_HERE;
dummyStatement(&vector, &list); dummyStatement(&vector, &list);
} }
@@ -1726,7 +1740,7 @@ void testQStack()
QStack<bool> vec; QStack<bool> vec;
vec.append(true); vec.append(true);
vec.append(false); vec.append(false);
// <=== Break here. BREAK_HERE;
dummyStatement(&vec); dummyStatement(&vec);
} }
@@ -1734,7 +1748,7 @@ void testQStack()
void testQUrl() void testQUrl()
{ {
QUrl url(QString("http://www.nokia.com")); QUrl url(QString("http://www.nokia.com"));
// <=== Break here. BREAK_HERE;
dummyStatement(&url); dummyStatement(&url);
} }
@@ -1782,7 +1796,7 @@ namespace qstringlist {
void testQStringList() void testQStringList()
{ {
QStringList l; QStringList l;
// <=== Break here. BREAK_HERE;
l << "Hello "; l << "Hello ";
l << " big, "; l << " big, ";
l << " fat "; l << " fat ";
@@ -1804,7 +1818,7 @@ namespace formats {
u = QString::fromUcs4((uint *)w); u = QString::fromUcs4((uint *)w);
else else
u = QString::fromUtf16((ushort *)w); u = QString::fromUtf16((ushort *)w);
// <== break here BREAK_HERE;
// All: Select UTF-8 in "Change Format for Type" in L&W context menu. // All: Select UTF-8 in "Change Format for Type" in L&W context menu.
// Windows: Select UTF-16 in "Change Format for Type" in L&W context menu. // Windows: Select UTF-16 in "Change Format for Type" in L&W context menu.
// Other: Select UCS-6 in "Change Format for Type" in L&W context menu. // Other: Select UCS-6 in "Change Format for Type" in L&W context menu.
@@ -1819,7 +1833,7 @@ namespace formats {
const char *s = "aöa"; const char *s = "aöa";
const char *t = "a\xc3\xb6"; const char *t = "a\xc3\xb6";
const wchar_t *w = L"aöa"; const wchar_t *w = L"aöa";
// <== break here BREAK_HERE;
// All: Select UTF-8 in "Change Format for Type" in L&W context menu. // All: Select UTF-8 in "Change Format for Type" in L&W context menu.
// Windows: Select UTF-16 in "Change Format for Type" in L&W context menu. // Windows: Select UTF-16 in "Change Format for Type" in L&W context menu.
// Other: Select UCS-6 in "Change Format for Type" in L&W context menu. // Other: Select UCS-6 in "Change Format for Type" in L&W context menu.
@@ -1835,7 +1849,7 @@ namespace formats {
const char s[] = "aöa"; const char s[] = "aöa";
const wchar_t w[] = L"aöa"; const wchar_t w[] = L"aöa";
// <== break here BREAK_HERE;
// All: Select UTF-8 in "Change Format for Type" in L&W context menu. // All: Select UTF-8 in "Change Format for Type" in L&W context menu.
// Windows: Select UTF-16 in "Change Format for Type" in L&W context menu. // Windows: Select UTF-16 in "Change Format for Type" in L&W context menu.
// Other: Select UCS-6 in "Change Format for Type" in L&W context menu. // Other: Select UCS-6 in "Change Format for Type" in L&W context menu.
@@ -1924,7 +1938,7 @@ namespace qvariant {
QVariant::Type t = QVariant::String; QVariant::Type t = QVariant::String;
value = QVariant(t, (void*)0); value = QVariant(t, (void*)0);
*(QString*)value.data() = QString("Some string"); *(QString*)value.data() = QString("Some string");
int i = 1; // <=== Break here. int i = 1; BREAK_HERE;
// Check the variant contains a proper QString. // Check the variant contains a proper QString.
dummyStatement(&i); dummyStatement(&i);
} }
@@ -1932,7 +1946,7 @@ namespace qvariant {
void testQVariant2() void testQVariant2()
{ {
QVariant var; // Type 0, invalid QVariant var; // Type 0, invalid
// <== Break here. BREAK_HERE;
// Step through with F10. // Step through with F10.
// Check var contains objects of the types indicated. // Check var contains objects of the types indicated.
var.setValue(true); // 1, bool var.setValue(true); // 1, bool
@@ -1974,7 +1988,7 @@ namespace qvariant {
void testQVariant3() void testQVariant3()
{ {
QVariant var; QVariant var;
// <== Break here.. BREAK_HERE;
// Expand var. // Expand var.
// Step with F10. // Step with F10.
// Check the list is updated properly. // Check the list is updated properly.
@@ -1991,7 +2005,7 @@ namespace qvariant {
QHostAddress ha("127.0.0.1"); QHostAddress ha("127.0.0.1");
var.setValue(ha); var.setValue(ha);
QHostAddress ha1 = var.value<QHostAddress>(); QHostAddress ha1 = var.value<QHostAddress>();
// <== Break here. BREAK_HERE;
// Expand ha, ha1 and var. // Expand ha, ha1 and var.
// Check var and ha1 look correct. // Check var and ha1 look correct.
dummyStatement(&ha1); dummyStatement(&ha1);
@@ -2008,7 +2022,7 @@ namespace qvariant {
var.setValue(my); var.setValue(my);
// FIXME: Known to break // FIXME: Known to break
//QString type = var.typeName(); //QString type = var.typeName();
var.setValue(my); // <== Break here. var.setValue(my); BREAK_HERE;
var.setValue(my); var.setValue(my);
var.setValue(my); var.setValue(my);
var.setValue(my); var.setValue(my);
@@ -2052,7 +2066,7 @@ namespace qvector {
{ {
// This tests the display of a big vector. // This tests the display of a big vector.
QVector<int> big(10000); QVector<int> big(10000);
// <=== Break here. BREAK_HERE;
// step over // step over
// check that the display updates in reasonable time // check that the display updates in reasonable time
big[1] = 1; big[1] = 1;
@@ -2072,7 +2086,7 @@ namespace qvector {
{ {
// This tests the display of a vector of pointers to custom structs. // This tests the display of a vector of pointers to custom structs.
QVector<Foo> flist; QVector<Foo> flist;
// <== Break here. BREAK_HERE;
// step over, check display. // step over, check display.
flist.append(1); flist.append(1);
flist.append(2); flist.append(2);
@@ -2098,7 +2112,7 @@ namespace qvector {
{ {
// This tests the display of a vector of pointers to custom structs. // This tests the display of a vector of pointers to custom structs.
QVector<Foo *> plist; QVector<Foo *> plist;
// <=== Break here. BREAK_HERE;
// step over // step over
// check that the display is ok. // check that the display is ok.
plist.append(new Foo(1)); plist.append(new Foo(1));
@@ -2113,7 +2127,7 @@ namespace qvector {
{ {
// This tests the display of a vector of custom structs. // This tests the display of a vector of custom structs.
QVector<bool> vec; QVector<bool> vec;
// <== Break here.. BREAK_HERE;
// step over // step over
// check that the display is ok. // check that the display is ok.
vec.append(true); vec.append(true);
@@ -2125,7 +2139,7 @@ namespace qvector {
{ {
QVector<QList<int> > v; QVector<QList<int> > v;
QVector<QList<int> > *pv = &v; QVector<QList<int> > *pv = &v;
// <=== Break here. BREAK_HERE;
v.append(QList<int>() << 1); v.append(QList<int>() << 1);
v.append(QList<int>() << 2 << 3); v.append(QList<int>() << 2 << 3);
dummyStatement(pv); dummyStatement(pv);
@@ -2168,7 +2182,7 @@ namespace noargs {
list2.append(Goo("Hello", 1)); list2.append(Goo("Hello", 1));
list2.append(Goo("World", 2)); list2.append(Goo("World", 2));
// <=== Break here.. BREAK_HERE;
// check display is ok, especially for _i_ and _k_ // check display is ok, especially for _i_ and _k_
dummyStatement(&i, &k); dummyStatement(&i, &k);
@@ -2263,7 +2277,7 @@ namespace namespc {
MyBar bar; MyBar bar;
MyAnon anon; MyAnon anon;
baz::MyBaz baz; baz::MyBaz baz;
// <== Break here. BREAK_HERE;
// step into the doit() functions // step into the doit() functions
baz.doit(1); baz.doit(1);
anon.doit(1); anon.doit(1);
@@ -2380,7 +2394,7 @@ namespace basic {
for (int i = 0; i != 3; ++i) for (int i = 0; i != 3; ++i)
for (int j = 0; j != 3; ++j) for (int j = 0; j != 3; ++j)
d[i][j] = i + j; d[i][j] = i + j;
// <== Break here. BREAK_HERE;
dummyStatement(&x, &f, &d, &ff, &diamond); dummyStatement(&x, &f, &d, &ff, &diamond);
} }
@@ -2391,7 +2405,7 @@ namespace basic {
c[1] = 'b'; c[1] = 'b';
c[2] = 'c'; c[2] = 'c';
c[3] = 'd'; c[3] = 'd';
// <== Break here. BREAK_HERE;
dummyStatement(&c); dummyStatement(&c);
} }
@@ -2402,7 +2416,7 @@ namespace basic {
s[1] = "b"; s[1] = "b";
s[2] = "c"; s[2] = "c";
s[3] = "d"; s[3] = "d";
// <== Break here. BREAK_HERE;
dummyStatement(&s); dummyStatement(&s);
} }
@@ -2413,7 +2427,7 @@ namespace basic {
b[1] = "b"; b[1] = "b";
b[2] = "c"; b[2] = "c";
b[3] = "d"; b[3] = "d";
// <== Break here. BREAK_HERE;
dummyStatement(&b); dummyStatement(&b);
} }
@@ -2425,7 +2439,7 @@ namespace basic {
foo[i].a = i; foo[i].a = i;
foo[i].doit(); foo[i].doit();
} }
// <== Break here. BREAK_HERE;
dummyStatement(&foo); dummyStatement(&foo);
} }
@@ -2435,7 +2449,7 @@ namespace basic {
{ {
char s[5]; char s[5];
s[0] = 0; s[0] = 0;
// <=== Break here.. BREAK_HERE;
// Expand 's' in Locals view. // Expand 's' in Locals view.
// Open pinnable tooltip. // Open pinnable tooltip.
// Step over. // Step over.
@@ -2454,7 +2468,7 @@ namespace basic {
void testCharStar() void testCharStar()
{ {
char *s = buf; char *s = buf;
// <=== Break here.. BREAK_HERE;
// Expand 's' in Locals view. // Expand 's' in Locals view.
// Open pinnable tooltip. // Open pinnable tooltip.
// Step over. // Step over.
@@ -2484,7 +2498,7 @@ namespace basic {
{ {
// This checks whether bitfields are properly displayed // This checks whether bitfields are properly displayed
S s; S s;
// <=== Break here. BREAK_HERE;
s.i = 0; s.i = 0;
dummyStatement(&s); dummyStatement(&s);
} }
@@ -2500,7 +2514,7 @@ namespace basic {
// This checks whether alphabetic sorting of structure // This checks whether alphabetic sorting of structure
// members work. // members work.
Color c; Color c;
// <=== Break here. BREAK_HERE;
// Expand c. // Expand c.
// Toogle "Sort Member Alphabetically" in context menu // Toogle "Sort Member Alphabetically" in context menu
// of "Locals and Expressions" view. // of "Locals and Expressions" view.
@@ -2521,7 +2535,7 @@ namespace basic {
myType2 t2 = 0; myType2 t2 = 0;
ns::vl j = 1000; ns::vl j = 1000;
ns::verylong k = 1000; ns::verylong k = 1000;
// <== Break here. BREAK_HERE;
dummyStatement(&j, &k, &t1, &t2); dummyStatement(&j, &k, &t1, &t2);
} }
@@ -2531,7 +2545,7 @@ namespace basic {
f.doit(); f.doit();
f.doit(); f.doit();
f.doit(); f.doit();
// <=== Break here. BREAK_HERE;
dummyStatement(&f); dummyStatement(&f);
} }
@@ -2539,7 +2553,7 @@ namespace basic {
{ {
// This tests the display of uninitialized data. // This tests the display of uninitialized data.
// <=== Break here. BREAK_HERE;
// Check the display: All values should be <uninitialized> or random data. // Check the display: All values should be <uninitialized> or random data.
// Check that nothing bad happens if items with random data // Check that nothing bad happens if items with random data
// are expanded. // are expanded.
@@ -2574,7 +2588,7 @@ namespace basic {
const char *s = "aöa"; const char *s = "aöa";
const wchar_t *w = L"aöa"; const wchar_t *w = L"aöa";
QString u; QString u;
// <== Break here. BREAK_HERE;
// All: Select UTF-8 in "Change Format for Type" in L&W context menu. // All: Select UTF-8 in "Change Format for Type" in L&W context menu.
// Windows: Select UTF-16 in "Change Format for Type" in L&W context menu. // Windows: Select UTF-16 in "Change Format for Type" in L&W context menu.
// Other: Select UCS-6 in "Change Format for Type" in L&W context menu. // Other: Select UCS-6 in "Change Format for Type" in L&W context menu.
@@ -2600,7 +2614,7 @@ namespace basic {
void A::doSomething(CVoidPtr cp) const void A::doSomething(CVoidPtr cp) const
{ {
// <=== Break here. BREAK_HERE;
// Check cp. // Check cp.
dummyStatement(&cp); dummyStatement(&cp);
} }
@@ -2610,7 +2624,7 @@ namespace basic {
A a; A a;
VoidPtr p = &a; VoidPtr p = &a;
CVoidPtr cp = &a; CVoidPtr cp = &a;
// <=== Break here. BREAK_HERE;
a.doSomething(cp); a.doSomething(cp);
dummyStatement(&a, &p); dummyStatement(&a, &p);
} }
@@ -2618,7 +2632,7 @@ namespace basic {
void testStringWithNewline() void testStringWithNewline()
{ {
QString hallo = "hallo\nwelt"; QString hallo = "hallo\nwelt";
// <=== Break here. BREAK_HERE;
// Check that string is properly displayed. // Check that string is properly displayed.
dummyStatement(&hallo); dummyStatement(&hallo);
} }
@@ -2626,7 +2640,7 @@ namespace basic {
void testMemoryView() void testMemoryView()
{ {
int a[20]; int a[20];
// <=== Break here. BREAK_HERE;
// Select "Open Memory View" from Locals and Expressions // Select "Open Memory View" from Locals and Expressions
// context menu for item 'a'. // context menu for item 'a'.
// Step several times. // Step several times.
@@ -2641,7 +2655,7 @@ namespace basic {
int i = 42; int i = 42;
double d = 23; double d = 23;
QString s = "Foo"; QString s = "Foo";
// <=== Break here. BREAK_HERE;
// Select "Open Memory View" from Locals and Expressions // Select "Open Memory View" from Locals and Expressions
// context menu for item 'd'. // context menu for item 'd'.
// Check that the opened memory view contains coloured items // Check that the opened memory view contains coloured items
@@ -2656,7 +2670,7 @@ namespace basic {
typedef int &Ref; typedef int &Ref;
const int c = 44; const int c = 44;
const Ref d = a; const Ref d = a;
// <=== Break here. BREAK_HERE;
dummyStatement(&a, &b, &c, &d); dummyStatement(&a, &b, &c, &d);
} }
@@ -2667,7 +2681,7 @@ namespace basic {
typedef QString &Ref; typedef QString &Ref;
const QString c = "world"; const QString c = "world";
const Ref d = a; const Ref d = a;
// <=== Break here. BREAK_HERE;
dummyStatement(&a, &b, &c, &d); dummyStatement(&a, &b, &c, &d);
} }
@@ -2680,7 +2694,7 @@ namespace basic {
bigv[i] = time; bigv[i] = time;
time.addDays(1); time.addDays(1);
} }
// <== Break here. BREAK_HERE;
// Expand bigv. // Expand bigv.
// This is expected to take up to a minute. // This is expected to take up to a minute.
dummyStatement(&bigv); dummyStatement(&bigv);
@@ -2692,7 +2706,7 @@ namespace basic {
int bigv[N]; int bigv[N];
for (int i = 0; i < N; ++i) for (int i = 0; i < N; ++i)
bigv[i] = i; bigv[i] = i;
// <== Break here. BREAK_HERE;
// Expand bigv. // Expand bigv.
// This is expected to take up to a minute. // This is expected to take up to a minute.
dummyStatement(&bigv); dummyStatement(&bigv);
@@ -2705,7 +2719,7 @@ namespace basic {
proc.waitForFinished(); proc.waitForFinished();
QByteArray ba = proc.readAllStandardError(); QByteArray ba = proc.readAllStandardError();
ba.append('x'); ba.append('x');
// <== Break here. BREAK_HERE;
// Check there is some contents in ba. Error message is expected. // Check there is some contents in ba. Error message is expected.
dummyStatement(&ba); dummyStatement(&ba);
} }
@@ -2714,7 +2728,7 @@ namespace basic {
{ {
typedef void (*func_t)(); typedef void (*func_t)();
func_t f2 = testPeekAndPoke3; func_t f2 = testPeekAndPoke3;
// <=== Break here. BREAK_HERE;
// Check there's a valid display for f2. // Check there's a valid display for f2.
dummyStatement(&f2); dummyStatement(&f2);
} }
@@ -2946,7 +2960,7 @@ namespace boost {
void testBoostOptional1() void testBoostOptional1()
{ {
boost::optional<int> i; boost::optional<int> i;
// <=== Break here. BREAK_HERE;
// Step. // Step.
i = 1; i = 1;
i = 3; i = 3;
@@ -2957,7 +2971,7 @@ namespace boost {
void testBoostOptional2() void testBoostOptional2()
{ {
boost::optional<QStringList> sl; boost::optional<QStringList> sl;
// <=== Break here. BREAK_HERE;
// Step. // Step.
sl = (QStringList() << "xxx" << "yyy"); sl = (QStringList() << "xxx" << "yyy");
sl.get().append("zzz"); sl.get().append("zzz");
@@ -2970,7 +2984,7 @@ namespace boost {
boost::shared_ptr<int> i(new int(43)); boost::shared_ptr<int> i(new int(43));
boost::shared_ptr<int> j = i; boost::shared_ptr<int> j = i;
boost::shared_ptr<QStringList> sl(new QStringList(QStringList() << "HUH!")); boost::shared_ptr<QStringList> sl(new QStringList(QStringList() << "HUH!"));
// <=== Break here. BREAK_HERE;
dummyStatement(&s, &j, &sl); dummyStatement(&s, &j, &sl);
} }
@@ -3108,7 +3122,7 @@ namespace kr {
KRBase *ptr1 = new KRA; KRBase *ptr1 = new KRA;
KRBase *ptr2 = new KRB; KRBase *ptr2 = new KRB;
ptr2 = new KRB; ptr2 = new KRB;
// <== Break here.. BREAK_HERE;
// check ptr1 is shown as KRA and ptr2 as KRB // check ptr1 is shown as KRA and ptr2 as KRB
dummyStatement(&ptr1, &ptr2); dummyStatement(&ptr1, &ptr2);
} }
@@ -3144,7 +3158,7 @@ namespace eigen {
} }
} }
// <=== Break here. BREAK_HERE;
// check that Locals and Expresssions view looks sane // check that Locals and Expresssions view looks sane
dummyStatement(&colMajorMatrix, &rowMajorMatrix, &test, dummyStatement(&colMajorMatrix, &rowMajorMatrix, &test,
&myMatrix, &myDynamicMatrix); &myMatrix, &myDynamicMatrix);
@@ -3159,7 +3173,7 @@ namespace bug842 {
{ {
// http://bugreports.qt.nokia.com/browse/QTCREATORBUG-842 // http://bugreports.qt.nokia.com/browse/QTCREATORBUG-842
qWarning("Test"); qWarning("Test");
// <=== Break here. BREAK_HERE;
// Check that Application Output pane contains string "Test". // Check that Application Output pane contains string "Test".
dummyStatement(); dummyStatement();
} }
@@ -3175,7 +3189,7 @@ namespace bug3611 {
typedef unsigned char byte; typedef unsigned char byte;
byte f = '2'; byte f = '2';
int *x = (int*)&f; int *x = (int*)&f;
// <=== Break here. BREAK_HERE;
// Step. // Step.
f += 1; f += 1;
f += 1; f += 1;
@@ -3234,7 +3248,7 @@ namespace bug4497 {
{ {
using namespace std; using namespace std;
//cin.get(); // if commented out, the debugger doesn't stop at the breakpoint in the next line. //cin.get(); // if commented out, the debugger doesn't stop at the breakpoint in the next line.
cout << "Hello, world!" << endl; // <=== Break here. cout << "Hello, world!" << endl; BREAK_HERE;
int sum = 0; int sum = 0;
for (int i = 1; i <= 10; i++) for (int i = 1; i <= 10; i++)
@@ -3268,7 +3282,7 @@ namespace bug4904 {
map.insert(cs1.id, cs1); map.insert(cs1.id, cs1);
map.insert(cs2.id, cs2); map.insert(cs2.id, cs2);
QMap<int, CustomStruct>::iterator it = map.begin(); QMap<int, CustomStruct>::iterator it = map.begin();
// <=== Break here. BREAK_HERE;
// - expand map/[0]/value // - expand map/[0]/value
// - verify map[0].key == -1 // - verify map[0].key == -1
// - verify map[0].value.id == -1 // - verify map[0].value.id == -1
@@ -3291,7 +3305,7 @@ namespace bug5046 {
f.b = 2; f.b = 2;
f.c = 3; f.c = 3;
f.a = 4; f.a = 4;
// <= Break here. BREAK_HERE;
// - pop up main editor tooltip over 'f' // - pop up main editor tooltip over 'f'
// - verify that the entry is expandable, and expansion works // - verify that the entry is expandable, and expansion works
dummyStatement(&f); dummyStatement(&f);
@@ -3320,7 +3334,7 @@ namespace bug5106 {
public: public:
B5106(int c, int a, int b) : A5106(a, b), m_c(c) {} B5106(int c, int a, int b) : A5106(a, b), m_c(c) {}
virtual int test() { return 4; } // <=== Break here. virtual int test() { return 4; BREAK_HERE; }
private: private:
int m_c; int m_c;
@@ -3348,7 +3362,7 @@ namespace bug5184 {
{ {
QNetworkRequest request(url); QNetworkRequest request(url);
QList<QByteArray> raw = request.rawHeaderList(); QList<QByteArray> raw = request.rawHeaderList();
return raw.size(); // <=== Break here. return raw.size(); BREAK_HERE;
} }
void test5184() void test5184()
@@ -3386,7 +3400,7 @@ namespace qc42170 {
void helper(Object *obj) void helper(Object *obj)
{ {
// <== Break here. BREAK_HERE;
// Check that obj is shown as a 'Circle' object. // Check that obj is shown as a 'Circle' object.
dummyStatement(obj); dummyStatement(obj);
} }
@@ -3423,7 +3437,7 @@ namespace bug5799 {
S1 a1[10]; S1 a1[10];
typedef S1 Array[10]; typedef S1 Array[10];
Array a2; Array a2;
// <=== Break here. BREAK_HERE;
// Expand s2 and s4. // Expand s2 and s4.
// Check there is no <unavailable synchronous data> // Check there is no <unavailable synchronous data>
dummyStatement(&s2, &s4, &a1, &a2); dummyStatement(&s2, &s4, &a1, &a2);
@@ -3448,7 +3462,7 @@ namespace qc41700 {
m["two"].push_back("2"); m["two"].push_back("2");
m["two"].push_back("3"); m["two"].push_back("3");
map_t::const_iterator it = m.begin(); map_t::const_iterator it = m.begin();
// <=== Break here. BREAK_HERE;
// Check that m is displayed nicely. // Check that m is displayed nicely.
dummyStatement(&it); dummyStatement(&it);
} }
@@ -3462,7 +3476,7 @@ namespace cp42895 {
void g(int c, int d) void g(int c, int d)
{ {
qDebug() << c << d; qDebug() << c << d;
// <== Break here. BREAK_HERE;
// Check there are frames for g and f in the stack view. // Check there are frames for g and f in the stack view.
dummyStatement(&c, &d); dummyStatement(&c, &d);
} }
@@ -3528,7 +3542,7 @@ namespace sanity {
QObject obj; QObject obj;
obj.setObjectName("An Object"); obj.setObjectName("An Object");
// <=== Break here. BREAK_HERE;
// Expand all. // Expand all.
dummyStatement(&s, &qv, &v, &list, &list2, &obj); dummyStatement(&s, &qv, &v, &list, &list2, &obj);
} }
@@ -3626,6 +3640,8 @@ int main(int argc, char *argv[])
bug5184::test5184(); bug5184::test5184();
bug5799::test5799(); bug5799::test5799();
application::testApplicationStart(argc, argv);
return 0; return 0;
} }