summaryrefslogtreecommitdiff
path: root/dbus/dbus-marshal-recursive-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbus/dbus-marshal-recursive-util.c')
-rw-r--r--dbus/dbus-marshal-recursive-util.c36
1 files changed, 7 insertions, 29 deletions
diff --git a/dbus/dbus-marshal-recursive-util.c b/dbus/dbus-marshal-recursive-util.c
index 95124140..0e2b4201 100644
--- a/dbus/dbus-marshal-recursive-util.c
+++ b/dbus/dbus-marshal-recursive-util.c
@@ -23,7 +23,7 @@
#include <config.h>
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-marshal-recursive.h"
#include "dbus-marshal-basic.h"
@@ -34,13 +34,7 @@
static void
basic_value_zero (DBusBasicValue *value)
{
-
-#ifdef DBUS_HAVE_INT64
value->u64 = 0;
-#else
- value->eight.first32 = 0;
- value->eight.second32 = 0;
-#endif
}
static dbus_bool_t
@@ -56,12 +50,7 @@ basic_value_equal (int type,
}
else
{
-#ifdef DBUS_HAVE_INT64
return lhs->u64 == rhs->u64;
-#else
- return lhs->eight.first32 == rhs->eight.first32 &&
- lhs->eight.second32 == rhs->eight.second32;
-#endif
}
}
@@ -1785,10 +1774,13 @@ make_and_run_test_nodes (void)
start_next_test ("All values in one big toplevel %d iteration\n", 1);
{
TestTypeNode *nodes[N_VALUES];
+ TestTypeNode *node;
i = 0;
- while ((nodes[i] = value_generator (&i)))
- ;
+ while ((node = value_generator (&i)))
+ {
+ nodes[i - 1] = node;
+ }
run_test_nodes (nodes, N_VALUES);
@@ -2337,7 +2329,6 @@ int32_read_multi (TestTypeNode *node,
return TRUE;
}
-#ifdef DBUS_HAVE_INT64
static dbus_int64_t
int64_from_seed (int seed)
{
@@ -2351,7 +2342,6 @@ int64_from_seed (int seed)
return v;
}
-#endif
static dbus_bool_t
int64_write_value (TestTypeNode *node,
@@ -2359,7 +2349,6 @@ int64_write_value (TestTypeNode *node,
DBusTypeWriter *writer,
int seed)
{
-#ifdef DBUS_HAVE_INT64
/* also used for uint64 */
dbus_int64_t v;
@@ -2368,9 +2357,6 @@ int64_write_value (TestTypeNode *node,
return _dbus_type_writer_write_basic (writer,
node->klass->typecode,
&v);
-#else
- return TRUE;
-#endif
}
static dbus_bool_t
@@ -2378,7 +2364,6 @@ int64_read_value (TestTypeNode *node,
DBusTypeReader *reader,
int seed)
{
-#ifdef DBUS_HAVE_INT64
/* also used for uint64 */
dbus_int64_t v;
@@ -2390,9 +2375,6 @@ int64_read_value (TestTypeNode *node,
_dbus_assert (v == int64_from_seed (seed));
return TRUE;
-#else
- return TRUE;
-#endif
}
static dbus_bool_t
@@ -2401,7 +2383,6 @@ int64_set_value (TestTypeNode *node,
DBusTypeReader *realign_root,
int seed)
{
-#ifdef DBUS_HAVE_INT64
/* also used for uint64 */
dbus_int64_t v;
@@ -2410,9 +2391,6 @@ int64_set_value (TestTypeNode *node,
return _dbus_type_reader_set_basic (reader,
&v,
realign_root);
-#else
- return TRUE;
-#endif
}
#define MAX_SAMPLE_STRING_LEN 10
@@ -3574,4 +3552,4 @@ container_destroy (TestTypeNode *node)
#endif /* !DOXYGEN_SHOULD_SKIP_THIS */
-#endif /* DBUS_BUILD_TESTS */
+#endif /* DBUS_ENABLE_EMBEDDED_TESTS */