summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2013-07-09 18:48:04 +0200
committerhjk <hjk121@nokiamail.com>2013-08-12 12:41:57 +0200
commite2aa5b53cf3afb8abddc1d7a5a99971349f18a2d (patch)
treefbb4444be304e641b0caf4182adf35e918822daf /tests
parentb26ef7e6cdf011150e0635a5363f3163d465e4d2 (diff)
downloadqt-creator-e2aa5b53cf3afb8abddc1d7a5a99971349f18a2d.tar.gz
Debugger: Add dumper for QIPv6Address and Q_IPV6ADDR
Change-Id: I85d8a484fdc3a265aa736d6a2f38ff955af8e138 Reviewed-by: David Schulz <david.schulz@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/debugger/tst_dumpers.cpp26
-rw-r--r--tests/manual/debugger/simple/simple_test_app.cpp28
2 files changed, 52 insertions, 2 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp
index 6c78c9d8f4..cea0ae7a5f 100644
--- a/tests/auto/debugger/tst_dumpers.cpp
+++ b/tests/auto/debugger/tst_dumpers.cpp
@@ -1400,7 +1400,7 @@ void tst_Dumpers::dumper_data()
% Check("it6.key", "33", "int")
% Check("it6.value", "33", "float");
- QTest::newRow("QHostAddress")
+ QTest::newRow("QHostAddress1")
<< Data("#include <QHostAddress>\n",
"QHostAddress ha1(129u * 256u * 256u * 256u + 130u);\n"
"QHostAddress ha2(\"127.0.0.1\");\n")
@@ -1409,6 +1409,30 @@ void tst_Dumpers::dumper_data()
% Check("ha1", "129.0.0.130", "@QHostAddress")
% Check("ha2", "\"127.0.0.1\"", "@QHostAddress");
+ QTest::newRow("QHostAddress2")
+ << Data("#include <QHostAddress>\n",
+ "QIPv6Address addr;\n"
+ "addr.c[0] = 0;\n"
+ "addr.c[1] = 1;\n"
+ "addr.c[2] = 2;\n"
+ "addr.c[3] = 3;\n"
+ "addr.c[4] = 5;\n"
+ "addr.c[5] = 6;\n"
+ "addr.c[6] = 0;\n"
+ "addr.c[7] = 0;\n"
+ "addr.c[8] = 8;\n"
+ "addr.c[9] = 9;\n"
+ "addr.c[10] = 10;\n"
+ "addr.c[11] = 11;\n"
+ "addr.c[12] = 0;\n"
+ "addr.c[13] = 0;\n"
+ "addr.c[14] = 0;\n"
+ "addr.c[15] = 0;\n"
+ "QHostAddress ha1(addr);\n")
+ % CoreProfile()
+ % Profile("QT += network\n")
+ % Check("addr", "1:203:506:0:809:a0b:0:0", "@QIPv6Address");
+
QTest::newRow("QImage")
<< Data("#include <QImage>\n"
"#include <QApplication>\n"
diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp
index f9af9b71df..a41b552eb3 100644
--- a/tests/manual/debugger/simple/simple_test_app.cpp
+++ b/tests/manual/debugger/simple/simple_test_app.cpp
@@ -1016,7 +1016,7 @@ namespace qhash {
namespace qhostaddress {
- void testQHostAddress()
+ void testQHostAddress1()
{
QHostAddress ha1(129u * 256u * 256u * 256u + 130u);
QHostAddress ha2("127.0.0.1");
@@ -1027,6 +1027,32 @@ namespace qhostaddress {
dummyStatement(&ha1, &ha2);
}
+ void testQHostAddress2()
+ {
+ QIPv6Address addr;
+ for (int i = 0; i != 16; ++i)
+ addr.c[i] = i;
+ addr.c[4] = 0;
+ addr.c[5] = 0;
+ addr.c[6] = 0;
+ addr.c[7] = 0;
+ addr.c[12] = 0;
+ addr.c[13] = 0;
+ addr.c[14] = 0;
+ addr.c[15] = 0;
+ QHostAddress ha1(addr);
+ BREAK_HERE;
+ // Continue.
+ dummyStatement(&ha1);
+ }
+
+ void testQHostAddress()
+ {
+ testQHostAddress1();
+ testQHostAddress2();
+ }
+
+
} // namespace qhostaddress