Blame tests-Fix-new-ID-type-handling-in-argument_from_va_list-test.patch

a4cc4d
From patchwork Thu Feb 23 12:47:41 2017
a4cc4d
Content-Type: text/plain; charset="utf-8"
a4cc4d
MIME-Version: 1.0
a4cc4d
Content-Transfer-Encoding: 7bit
a4cc4d
Subject: tests: Fix "new ID" type handling in argument_from_va_list test
a4cc4d
From: Carlos Garnacho <carlosg@gnome.org>
a4cc4d
X-Patchwork-Id: 140495
a4cc4d
Message-Id: <20170223124741.471-1-carlosg@gnome.org>
a4cc4d
To: wayland-devel@lists.freedesktop.org
a4cc4d
Cc: Carlos Garnacho <carlosg@gnome.org>
a4cc4d
Date: Thu, 23 Feb 2017 13:47:41 +0100
a4cc4d
a4cc4d
New IDs are internally dealt with as objects, however this test
a4cc4d
expected to deal with 'n' as the uint32_t type that's just seen
a4cc4d
through the wire. We should give it an object instead, and
a4cc4d
expect an object from it.
a4cc4d
a4cc4d
https://bugs.freedesktop.org/show_bug.cgi?id=99899
a4cc4d
a4cc4d
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
a4cc4d
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
a4cc4d
Tested-by: Kalev Lember <kalevlember@gmail.com>
a4cc4d
---
a4cc4d
 tests/connection-test.c | 6 +++---
a4cc4d
 1 file changed, 3 insertions(+), 3 deletions(-)
a4cc4d
a4cc4d
diff --git a/tests/connection-test.c b/tests/connection-test.c
a4cc4d
index 1c688f1..8be6c38 100644
a4cc4d
--- a/tests/connection-test.c
a4cc4d
+++ b/tests/connection-test.c
a4cc4d
@@ -142,7 +142,7 @@ va_list_wrapper(const char *signature, union wl_argument *args, int count, ...)
a4cc4d
 TEST(argument_from_va_list)
a4cc4d
 {
a4cc4d
 	union wl_argument args[WL_CLOSURE_MAX_ARGS];
a4cc4d
-	struct wl_object fake_object;
a4cc4d
+	struct wl_object fake_object, fake_new_object;
a4cc4d
 	struct wl_array fake_array;
a4cc4d
 
a4cc4d
 	va_list_wrapper("i", args, 1, 100);
a4cc4d
@@ -154,13 +154,13 @@ TEST(argument_from_va_list)
a4cc4d
 
a4cc4d
 	va_list_wrapper("?iuf?sonah", args, 8,
a4cc4d
 			102, 103, wl_fixed_from_int(104), "value",
a4cc4d
-			&fake_object, 105, &fake_array, 106);
a4cc4d
+			&fake_object, &fake_new_object, &fake_array, 106);
a4cc4d
 	assert(args[0].i == 102);
a4cc4d
 	assert(args[1].u == 103);
a4cc4d
 	assert(args[2].f == wl_fixed_from_int(104));
a4cc4d
 	assert(strcmp(args[3].s, "value") == 0);
a4cc4d
 	assert(args[4].o == &fake_object);
a4cc4d
-	assert(args[5].n == 105);
a4cc4d
+	assert(args[5].o == &fake_new_object);
a4cc4d
 	assert(args[6].a == &fake_array);
a4cc4d
 	assert(args[7].h == 106);
a4cc4d
 }