mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 06:51:10 +00:00
Merge branch 'matthiasc/for-main' into 'main'
a11y: Add a test for gtk_accessible_role_to_name See merge request GNOME/gtk!5694
This commit is contained in:
commit
c237957ef0
29
testsuite/gtk/a11y.c
Normal file
29
testsuite/gtk/a11y.c
Normal file
@ -0,0 +1,29 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include "gtk/gtkaccessibleprivate.h"
|
||||
|
||||
static void
|
||||
test_role_to_name (void)
|
||||
{
|
||||
GEnumClass *class;
|
||||
|
||||
class = g_type_class_ref (GTK_TYPE_ACCESSIBLE_ROLE);
|
||||
|
||||
for (unsigned int i = 0; i < class->n_values; i++)
|
||||
{
|
||||
GtkAccessibleRole role = class->values[i].value;
|
||||
|
||||
g_assert_nonnull (gtk_accessible_role_to_name (role, "gtk40"));
|
||||
}
|
||||
|
||||
g_type_class_unref (class);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
(g_test_init) (&argc, &argv, NULL);
|
||||
|
||||
g_test_add_func ("/a11y/role-to-name", test_role_to_name);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
@ -128,6 +128,7 @@ internal_tests = [
|
||||
{ 'name': 'textbuffer' },
|
||||
{ 'name': 'texthistory' },
|
||||
{ 'name': 'fnmatch' },
|
||||
{ 'name': 'a11y' },
|
||||
]
|
||||
|
||||
is_debug = get_option('buildtype').startswith('debug')
|
||||
|
Loading…
Reference in New Issue
Block a user