summaryrefslogtreecommitdiff
path: root/gtk/gtktestatcontext.h
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2020-11-10 14:14:47 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2020-11-10 14:31:56 +0000
commitc264254d4bc2e641042db744a9ada7504d53351f (patch)
treeb5f68e7ef81c33b3ce4eab9f5c41d1506d4d9569 /gtk/gtktestatcontext.h
parent6af89e90348ae83d1d88fbf094660205fa45989f (diff)
downloadgtk+-c264254d4bc2e641042db744a9ada7504d53351f.tar.gz
a11y: Parse reference lists using varargs
Using GList is a bit lame, and makes the API more complicated to use than necessary in the common case. The only real use case for a GList is gtk_widget_add_mnemonic_label(), and for that we can use the GValue-based API instead. Fixes: #3343
Diffstat (limited to 'gtk/gtktestatcontext.h')
-rw-r--r--gtk/gtktestatcontext.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/gtk/gtktestatcontext.h b/gtk/gtktestatcontext.h
index 430e7c405d..70d248b19a 100644
--- a/gtk/gtktestatcontext.h
+++ b/gtk/gtktestatcontext.h
@@ -52,19 +52,19 @@ G_STMT_START { \
* gtk_test_accessible_assert_property:
* @accessible: a #GtkAccessible
* @property: a #GtkAccessibleProperty
- * @value: the value of @property
+ * @...: the value of @property
*
* Checks whether a #GtkAccessible implementation has its accessible
- * property set to the expected @value, and raises an assertion if the
+ * property set to the expected value, and raises an assertion if the
* condition is not satisfied.
*/
-#define gtk_test_accessible_assert_property(accessible,property,value) \
+#define gtk_test_accessible_assert_property(accessible,property,...) \
G_STMT_START { \
GtkAccessible *__a = GTK_ACCESSIBLE (accessible); \
GtkAccessibleProperty __p = (property); \
- char *__value = gtk_test_accessible_check_property (__a, __p, (value)); \
+ char *__value = gtk_test_accessible_check_property (__a, __p, __VA_ARGS__); \
if (__value == NULL) ; else { \
- char *__msg = g_strdup_printf ("assertion failed: (" #accessible ".accessible-property(" #property ") == " #value "): value = '%s'", __value); \
+ char *__msg = g_strdup_printf ("assertion failed: (" #accessible ".accessible-property(" #property ") == " # __VA_ARGS__ "): value = '%s'", __value); \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, __msg); \
g_free (__msg); \
} \
@@ -74,19 +74,19 @@ G_STMT_START { \
* gtk_test_accessible_assert_relation:
* @accessible: a #GtkAccessible
* @relation: a #GtkAccessibleRelation
- * @value: the expected value of @relation
+ * @...: the expected value of @relation
*
* Checks whether a #GtkAccessible implementation has its accessible
- * relation set to the expected @value, and raises an assertion if the
+ * relation set to the expected value, and raises an assertion if the
* condition is not satisfied.
*/
-#define gtk_test_accessible_assert_relation(accessible,relation,value) \
+#define gtk_test_accessible_assert_relation(accessible,relation,...) \
G_STMT_START { \
GtkAccessible *__a = GTK_ACCESSIBLE (accessible); \
GtkAccessibleRelation __r = (relation); \
- char *__value = gtk_test_accessible_check_relation (__a, __r, (value)); \
+ char *__value = gtk_test_accessible_check_relation (__a, __r, __VA_ARGS__); \
if (__value == NULL); else { \
- char *__msg = g_strdup_printf ("assertion failed: (" #accessible ".accessible-relation(" #relation ") == " #value "): value = '%s'", __value); \
+ char *__msg = g_strdup_printf ("assertion failed: (" #accessible ".accessible-relation(" #relation ") == " # __VA_ARGS__ "): value = '%s'", __value); \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, __msg); \
g_free (__msg); \
} \
@@ -96,19 +96,19 @@ G_STMT_START { \
* gtk_test_accessible_assert_state:
* @accessible: a #GtkAccessible
* @state: a #GtkAccessibleRelation
- * @value: the expected value of @state
+ * @...: the expected value of @state
*
* Checks whether a #GtkAccessible implementation has its accessible
- * state set to the expected @value, and raises an assertion if the
+ * state set to the expected value, and raises an assertion if the
* condition is not satisfied.
*/
-#define gtk_test_accessible_assert_state(accessible,state,value) \
+#define gtk_test_accessible_assert_state(accessible,state,...) \
G_STMT_START { \
GtkAccessible *__a = GTK_ACCESSIBLE (accessible); \
GtkAccessibleState __s = (state); \
- char *__value = gtk_test_accessible_check_state (__a, __s, (value)); \
+ char *__value = gtk_test_accessible_check_state (__a, __s, __VA_ARGS__); \
if (__value == NULL); else { \
- char *__msg = g_strdup_printf ("assertion failed: (" #accessible ".accessible-state(" #state ") == " #value "): value = '%s'", __value); \
+ char *__msg = g_strdup_printf ("assertion failed: (" #accessible ".accessible-state(" #state ") == " # __VA_ARGS__ "): value = '%s'", __value); \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, __msg); \
g_free (__msg); \
} \