[at-spi2-core: 7/9] test_struct_with_array() - use the correct variable in the assertions




commit e0f4bda42b95d9193321c2b1693f032b7c1b758f
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Nov 23 13:00:35 2021 -0600

    test_struct_with_array() - use the correct variable in the assertions
    
    The code is testing the demarshaled value, which lives in q, not in p.

 dbind/dbtest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/dbind/dbtest.c b/dbind/dbtest.c
index b338c036..085d7ffb 100644
--- a/dbind/dbtest.c
+++ b/dbind/dbtest.c
@@ -293,8 +293,8 @@ void test_struct_with_array ()
     demarshal (msg, TYPEOF_ARRAYSTRUCT, &a2);
 
     q = &g_array_index (a2, ArrayStruct, 0);
-    g_assert (p[0].pad1 == 2);
-    g_assert (g_array_index (p[1].vals, dbus_uint32_t, 1) == 1000000000);
+    g_assert (q[0].pad1 == 2);
+    g_assert (g_array_index (q[1].vals, dbus_uint32_t, 1) == 1000000000);
     
     printf ("struct with array ok\n");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]