tests: spa-pod: fix int64 constant to work on all architectures

the "long" type in spa-pod is int64_t, so we need to make sure we
pass a 64-bit number there, otherwise the va_args is going to crash
on some architectures while reading arguments off the stack
This commit is contained in:
George Kiagiadakis 2021-05-13 09:15:45 +03:00
parent 58db9e1fad
commit ba6404f7d6

View file

@ -611,7 +611,7 @@ test_spa_pod_sequence (void)
/* Static */
{
g_autoptr (WpSpaPod) pod = wp_spa_pod_new_sequence (0,
10, "Properties", "l", 9999, NULL);
10, "Properties", "l", G_GINT64_CONSTANT (9999), NULL);
g_assert_nonnull (pod);
g_assert_true (wp_spa_pod_is_sequence (pod));
g_assert_cmpstr ("Spa:Pod:Sequence", ==,
@ -622,7 +622,7 @@ test_spa_pod_sequence (void)
{
g_autoptr (WpSpaPodBuilder) b = wp_spa_pod_builder_new_sequence (0);
wp_spa_pod_builder_add_control (b, 10, "Properties");
wp_spa_pod_builder_add_long (b, 9999);
wp_spa_pod_builder_add_long (b, G_GINT64_CONSTANT (9999));
g_autoptr (WpSpaPod) pod = wp_spa_pod_builder_end (b);
g_assert_nonnull (pod);
g_assert_true (wp_spa_pod_is_sequence (pod));