Commit 2dc1ed8c authored by hjk's avatar hjk Committed by hjk

debugger: add manual test for QHostAddress dumper

Change-Id: I6cc146b1d5b21a4d4881a35a11ce24ad378e813c
Reviewed-on: http://codereview.qt.nokia.com/2694Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent a5e893a4
......@@ -429,14 +429,12 @@ def qdump__QHostAddress(d, item):
if int(data["ipString"]["d"]["size"]):
d.putStringValue(data["ipString"])
else:
a = data["a"]
m, a = divmod(a, 256 * 256 * 256)
s = str(m)
m, a = divmod(a, 256 * 256)
s = s + "." + str(m)
m, a = divmod(a, 256)
s = s + "." + str(m)
d.putValue(s)
a = long(data["a"])
a, n4 = divmod(a, 256)
a, n3 = divmod(a, 256)
a, n2 = divmod(a, 256)
a, n1 = divmod(a, 256)
d.putValue("%d.%d.%d.%d" % (n1, n2, n3, n4));
d.putNumChild(1)
if d.isExpanded(item):
with Children(d):
......
......@@ -642,6 +642,19 @@ void testQFixed()
*/
}
namespace qhostaddress {
void testQHostAddress()
{
QHostAddress ha1(129 * 256 * 256 * 256 + 130);
QHostAddress ha2("127.0.0.1");
// <== break here
// Check ha1 and ha2 look correct.
dummyStatement(&ha1, &ha2);
}
} // namespace qhostaddress
QHash<int, float> testQHash()
{
#if 1
......@@ -3161,6 +3174,7 @@ namespace varargs {
int main(int argc, char *argv[])
{
qhostaddress::testQHostAddress();
varargs::testVaList();
cp42895::test42895();
bug5046::test5046();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment