Add unittest for ObjectPath

This commit is contained in:
Harry T. Vennik 2017-06-25 18:30:34 +02:00
parent 7e46fb6401
commit 16efa3a6c3

View file

@ -56,6 +56,17 @@ struct ObjectPath {
}
}
unittest {
import dunit.toolkit;
ObjectPath("some.invalid/object_path").assertThrow();
ObjectPath("/path/with/TrailingSlash/").assertThrow();
string path = "/org/freedesktop/DBus";
auto obj = ObjectPath(path);
obj.toString().assertEqual(path);
obj.toHash().assertEqual(path.hashOf);
}
/// Structure allowing typeless parameters
struct DBusAny {
/// DBus type of the value (never 'v'), see typeSig!T