summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-sysdeps.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-10-11 06:20:28 +0000
committerHavoc Pennington <hp@redhat.com>2003-10-11 06:20:28 +0000
commit40751c847b18b4861f623fc83fc8742bc463363b (patch)
treef4875210529f3f957841f234f3316bc614c9fcba /dbus/dbus-sysdeps.c
parentc1f0e189030ceb2bafea0bc30d6b72a0fa381ddc (diff)
2003-10-11 Havoc Pennington <hp@pobox.com>
* dbus/dbus-message.c (_dbus_message_test): add more test coverage, but #if 0 for now since they uncover a bug not fixed yet; I think in re_align_field_recurse() (re_align_field_recurse): add FIXME about broken assertion * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage * bus/connection.c: share a couple code bits with expirelist.c * bus/expirelist.h, bus/expirelist.c: implement a generic expire-items-after-N-seconds facility, was going to share between expiring connections and replies, decided not to use for expiring connections for now. * bus/connection.c: add tracking of expected replies * COPYING: include AFL 2.0 (still need to change all the file headers)
Diffstat (limited to 'dbus/dbus-sysdeps.c')
-rw-r--r--dbus/dbus-sysdeps.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c
index c3ddf8cd..5011f224 100644
--- a/dbus/dbus-sysdeps.c
+++ b/dbus/dbus-sysdeps.c
@@ -3381,6 +3381,24 @@ _dbus_sysdeps_test (void)
exit (1);
}
+ _dbus_string_init_const (&str, "0xff");
+ if (!_dbus_string_parse_double (&str,
+ 0, &val, &pos))
+ {
+ _dbus_warn ("Failed to parse double");
+ exit (1);
+ }
+ if (val != 0xff)
+ {
+ _dbus_warn ("Failed to parse 0xff correctly, got: %f", val);
+ exit (1);
+ }
+ if (pos != 4)
+ {
+ _dbus_warn ("_dbus_string_parse_double of \"0xff\" returned wrong position %d", pos);
+ exit (1);
+ }
+
check_path_absolute ("/", TRUE);
check_path_absolute ("/foo", TRUE);
check_path_absolute ("", FALSE);