summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-11-10 12:59:56 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-14 07:33:57 +0100
commit578e6d6834ae8608fb98f1f871e7bd21d64aaf1e (patch)
tree65cb486e2ca15355415280bccd4cca78a6d8e9f3 /tests/auto/corelib/tools
parent3e0dece1518989bfd6cf5769e574ce199670ec88 (diff)
Cleanup corelib autotests
Remove various disabled and/or non-helpful debugging code. Any test diagnostics that are useful should be part of the regular test output, as the CI system cannot switch on commented-out code when there is a test failure. Diagnostics should also be informative -- simply printing the value of a variable with no other information about what is being printed (or why it is being printed) is not informative. Change-Id: I21a6c2121be86001bb57e80f426507b6e619ee9e Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r--tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp4
-rw-r--r--tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp1
-rw-r--r--tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp1
-rw-r--r--tests/auto/corelib/tools/qhash/tst_qhash.cpp8
-rw-r--r--tests/auto/corelib/tools/qlist/tst_qlist.cpp2
-rw-r--r--tests/auto/corelib/tools/qmap/tst_qmap.cpp5
-rw-r--r--tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp2
7 files changed, 0 insertions, 23 deletions
diff --git a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
index 3ef92eff3c..4d2b49937e 100644
--- a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
+++ b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
@@ -256,10 +256,6 @@ void tst_QBitArray::fill()
for (i = 0; i < N-M; ++i) {
a.fill(true, i, i + M);
-/*
- for (int k = 0; k < N; ++k)
- qDebug("%*s%d", k, "", a.at(k));
-*/
for (j = 0; j < N; ++j) {
if (j >= i && j < i + M) {
QVERIFY(a.at(j));
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
index f3f453ae22..1899704355 100644
--- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
@@ -184,7 +184,6 @@ void tst_QByteArray::qCompress()
{
QFETCH( QByteArray, ba );
QByteArray compressed = ::qCompress( ba );
- //qDebug( "size uncompressed: %d size compressed: %d", ba.size(), compressed.size() );
QTEST( ::qUncompress( compressed ), "ba" );
}
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
index 1bea54f2ec..f0671b5af4 100644
--- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
@@ -539,7 +539,6 @@ void tst_QDateTime::toString_enumformat()
QCOMPARE(str2, QString("1995-05-20T12:34:56"));
QString str3 = dt1.toString(Qt::LocalDate);
- qDebug() << str3;
QVERIFY(!str3.isEmpty());
//check for date/time components in any order
//year may be 2 or 4 digits
diff --git a/tests/auto/corelib/tools/qhash/tst_qhash.cpp b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
index 00439c585b..6e668c33f5 100644
--- a/tests/auto/corelib/tools/qhash/tst_qhash.cpp
+++ b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
@@ -94,22 +94,17 @@ class MyClass
{
public:
MyClass() { ++count;
-// qDebug("creating MyClass count=%d", count);
}
MyClass( const QString& c) {
count++; str = c;
-// qDebug("creating MyClass '%s' count = %d", str.latin1(), count);
}
~MyClass() {
count--;
-// qDebug("deleting MyClass '%s' count = %d", str.latin1(), count);
}
MyClass( const MyClass& c ) {
count++; str = c.str;
-// qDebug("creating MyClass '%s' count = %d", str.latin1(), count);
}
MyClass &operator =(const MyClass &o) {
-// qDebug("copying MyClass '%s'", o.str.latin1());
str = o.str; return *this;
}
@@ -916,7 +911,6 @@ void tst_QHash::iterators()
while(javaIt.hasNext()) {
++i;
javaIt.next();
- //qDebug(javaIt.value());
QVERIFY(javaIt.value() == testMap.value(i));
}
@@ -934,7 +928,6 @@ void tst_QHash::iterators()
testString = javaIt.value();
testString1 = javaIt.peekNext().value();
javaIt.next();
- //qDebug(testString + " " + testString1 + " " + javaIt.peekPrevious().value());
QVERIFY(javaIt.value() == testString1);
QCOMPARE(javaIt.peekPrevious().value(), testString1);
}
@@ -943,7 +936,6 @@ void tst_QHash::iterators()
testString1 = javaIt.peekPrevious().value();
javaIt.previous();
QVERIFY(javaIt.value() == testString1);
- //qDebug(testString + testString1 + javaIt.peekNext().value());
QCOMPARE(javaIt.peekNext().value(), testString1);
}
}
diff --git a/tests/auto/corelib/tools/qlist/tst_qlist.cpp b/tests/auto/corelib/tools/qlist/tst_qlist.cpp
index 3d062919da..d08cb7290b 100644
--- a/tests/auto/corelib/tools/qlist/tst_qlist.cpp
+++ b/tests/auto/corelib/tools/qlist/tst_qlist.cpp
@@ -153,13 +153,11 @@ void tst_QList::append() const
list2.append(three);
list2.append(four);
list1.append(list2);
- qDebug() << list1;
listTotal.append(one);
listTotal.append(two);
listTotal.append(three);
listTotal.append(four);
QCOMPARE(list1, listTotal);
-
}
void tst_QList::prepend() const
diff --git a/tests/auto/corelib/tools/qmap/tst_qmap.cpp b/tests/auto/corelib/tools/qmap/tst_qmap.cpp
index d63431f921..4a3b5b490e 100644
--- a/tests/auto/corelib/tools/qmap/tst_qmap.cpp
+++ b/tests/auto/corelib/tools/qmap/tst_qmap.cpp
@@ -86,22 +86,17 @@ class MyClass
public:
MyClass() {
++count;
-// qDebug("creating MyClass count=%d", count);
}
MyClass( const QString& c) {
count++; str = c;
-// qDebug("creating MyClass '%s' count = %d", str.latin1(), count);
}
~MyClass() {
count--;
-// qDebug("deleting MyClass '%s' count = %d", str.latin1(), count);
}
MyClass( const MyClass& c ) {
count++; str = c.str;
-// qDebug("creating MyClass '%s' count = %d", str.latin1(), count);
}
MyClass &operator =(const MyClass &o) {
-// qDebug("copying MyClass '%s'", o.str.latin1());
str = o.str; return *this;
}
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
index a649824a61..f2a356b177 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
+++ b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
@@ -242,7 +242,6 @@ void tst_QTextBoundaryFinder::isAtWordStart()
for(int i=0; i < txt.length(); ++i) {
finder.setPosition(i);
QTextBoundaryFinder::BoundaryReasons r = finder.boundaryReasons();
- // qDebug() << i << r;
QCOMPARE((r & QTextBoundaryFinder::StartWord) != 0, start.contains(i) == true);
QCOMPARE((r & QTextBoundaryFinder::EndWord) != 0, end.contains(i) == true);
}
@@ -277,7 +276,6 @@ void tst_QTextBoundaryFinder::isAtBoundaryLine()
// break? - - - - + - +
QChar s[] = { 0x0061, 0x00AD, 0x0062, 0x0009, 0x0063, 0x0064 };
QString text(s, sizeof(s)/sizeof(s[0]));
-// qDebug() << "text = " << text << ", length = " << text.length();
QTextBoundaryFinder finder(QTextBoundaryFinder::Line, text.constData(), text.length(), /*buffer*/0, /*buffer size*/0);
finder.setPosition(0);
QVERIFY(finder.isAtBoundary());