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