test-bus-gvariant.c revision b381de4197157748ed96e469fcc372c23f842ae1
6511N/A along with systemd; If not, see <http://www.gnu.org/licenses/>.
6511N/A#include "bus-gvariant.h"
6511N/A#include "bus-util.h"
6511N/A#include "bus-internal.h"
6511N/A#include "bus-message.h"
6511N/A#include "bus-dump.h"
6511N/Astatic void test_bus_gvariant_is_fixed_size(void) {
6511N/Astatic void test_bus_gvariant_get_size(void) {
static void test_bus_gvariant_get_alignment(void) {
static void test_marshal(void) {
assert_se(sd_bus_message_new_method_call(bus, &m, "a.service.name", "/an/object/path/which/is/really/really/long/so/that/we/hit/the/eight/bit/boundary/by/quite/some/margin/to/test/this/stuff/that/it/really/works", "an.interface.name", "AMethodName") >= 0);
#ifdef HAVE_GLIB
GVariant *v;
#if !defined(GLIB_VERSION_2_36)
g_type_init();
v = g_variant_new_from_data(G_VARIANT_TYPE("(yyyyuta{tv})"), m->header, sizeof(struct bus_header) + m->fields_size, false, NULL, NULL);
g_free(t);
g_variant_unref(v);
v = g_variant_new_from_data(G_VARIANT_TYPE("(a(usv))"), m->body.data, m->user_body_size, false, NULL, NULL);
g_free(t);
g_variant_unref(v);
#ifdef HAVE_GLIB
GVariant *v;
g_free(t);
g_variant_unref(v);
m = sd_bus_message_unref(m);
test_marshal();