debugger: add QXmlAttributes manual test

This commit is contained in:
hjk
2011-03-29 14:57:15 +02:00
parent 7f34b5008b
commit f130cd16a8
5 changed files with 147 additions and 4 deletions

View File

@@ -1688,6 +1688,8 @@ def qdump__QWeakPointer(d, item):
d.putIntItem("strongref", strongref)
def qdump__QxXmlAttributes(d, item):
pass
#######################################################################
#

View File

@@ -2458,9 +2458,9 @@ void GdbEngine::handleBreakListMultiple(const GdbResponse &response)
QTC_ASSERT(response.resultClass == GdbResultDone, /**/)
const BreakpointId id = response.cookie.toInt();
BreakHandler *handler = breakHandler();
BreakpointResponse br = handler->response(id);
br.addresses.append(0);
handler->setResponse(id, br);
const QString str = QString::fromLocal8Bit(
response.data.findChild("consolestreamoutput").data());
extractDataFromInfoBreak(str, id);
}
void GdbEngine::handleBreakDisable(const GdbResponse &response)

View File

@@ -0,0 +1,126 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** No Commercial Usage
**
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**************************************************************************/
#ifndef SIMPLE_DEBUGGER_TEST_H
#define SIMPLE_DEBUGGER_TEST_H
struct SomeClassWithInlineConstructor
{
SomeClassWithInlineConstructor()
{
a = 21;
}
int a;
};
struct SomeBaseClassWithInlineConstructor
{
SomeBaseClassWithInlineConstructor()
{
a = 21;
}
virtual ~SomeBaseClassWithInlineConstructor();
int a;
};
struct SomeDerivedClassWithInlineConstructor
: SomeBaseClassWithInlineConstructor
{
SomeDerivedClassWithInlineConstructor()
{
a = 21;
}
virtual ~SomeDerivedClassWithInlineConstructor();
int a;
};
template <class T>
struct SomeTemplatedClassWithInlineConstructor
{
SomeTemplatedClassWithInlineConstructor()
{
a = 21;
}
T a;
};
template <class T>
struct SomeTemplatedBaseClassWithInlineConstructor
{
SomeTemplatedBaseClassWithInlineConstructor()
{
a = 21;
}
virtual ~SomeTemplatedBaseClassWithInlineConstructor();
T a;
};
template <class T>
struct SomeTemplatedDerivedClassWithInlineConstructor
: SomeTemplatedBaseClassWithInlineConstructor<T>
{
SomeTemplatedDerivedClassWithInlineConstructor()
{
a = 21;
}
virtual ~SomeTemplatedDerivedClassWithInlineConstructor();
T a;
};
SomeBaseClassWithInlineConstructor::~SomeBaseClassWithInlineConstructor() {}
SomeDerivedClassWithInlineConstructor::~SomeDerivedClassWithInlineConstructor() {}
template <typename T>
SomeTemplatedBaseClassWithInlineConstructor<T>::
~SomeTemplatedBaseClassWithInlineConstructor() {}
template <typename T>
SomeTemplatedDerivedClassWithInlineConstructor<T>::
~SomeTemplatedDerivedClassWithInlineConstructor() {}
void testInlineBreakpoints()
{
SomeClassWithInlineConstructor a;
SomeBaseClassWithInlineConstructor b;
SomeDerivedClassWithInlineConstructor c;
SomeTemplatedClassWithInlineConstructor<int> d;
SomeTemplatedBaseClassWithInlineConstructor<int> e;
SomeTemplatedDerivedClassWithInlineConstructor<int> f;
int i = a.a + b.a + c.a + d.a + e.a + f.a;
++i;
}
#endif // SIMPLE_DEBUGGER_TEST_H

View File

@@ -35,7 +35,7 @@
//template <typename T> class B; B foo() {}
#include "simple_gdbtest_app.h"
#include "../deeper/simple_gdbtest_app.h"
#include <QtCore/QDebug>
#include <QtCore/QDateTime>
@@ -76,6 +76,8 @@
#include <QtScript/QScriptEngine>
#include <QtScript/QScriptValue>
#include <QtXml/QXmlAttributes>
#include <QtNetwork/QHostAddress>
#include <deque>
@@ -1236,6 +1238,16 @@ void testQSharedPointer()
}
#endif
void testQXmlAttributes()
{
QXmlAttributes atts;
atts.append("name1", "uri1", "localPart1", "value1");
atts.append("name2", "uri2", "localPart2", "value2");
atts.append("name3", "uri3", "localPart3", "value3");
int n = atts.count();
++n;
}
void stringRefTest(const QString &refstring)
{
Q_UNUSED(refstring);
@@ -2547,6 +2559,7 @@ void testMPI()
int main(int argc, char *argv[])
{
testQXmlAttributes();
testQRegExp();
testInlineBreakpoints();
testLongEvaluation();

View File

@@ -1,12 +1,14 @@
TEMPLATE = app
TARGET = simple_gdbtest_app
DEPENDPATH += .
INCLUDEPATH += .
DESTDIR = .
SOURCES += simple_gdbtest_app.cpp
QT += network
QT += script
QT += xml
#unix: QMAKE_CXXFLAGS += -msse2
#DEFINES += USE_BOOST=1