mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 05:50:10 +00:00
Test the new property and fix oversights found by the test
This commit is contained in:
parent
38fd66dc04
commit
9bf23d80a1
@ -1667,7 +1667,7 @@ gtk_accessible_value_get_default_for_property (GtkAccessibleProperty property)
|
||||
{
|
||||
const GtkAccessibleCollect *cstate = &collect_props[property];
|
||||
|
||||
g_return_val_if_fail (property <= GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT, NULL);
|
||||
g_return_val_if_fail (property <= GTK_ACCESSIBLE_PROPERTY_HELP_TEXT, NULL);
|
||||
|
||||
switch (cstate->value)
|
||||
{
|
||||
@ -1738,7 +1738,7 @@ gtk_accessible_value_collect_for_property (GtkAccessibleProperty property,
|
||||
{
|
||||
const GtkAccessibleCollect *cstate = &collect_props[property];
|
||||
|
||||
g_return_val_if_fail (property <= GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT, NULL);
|
||||
g_return_val_if_fail (property <= GTK_ACCESSIBLE_PROPERTY_HELP_TEXT, NULL);
|
||||
|
||||
return gtk_accessible_value_collect_valist (cstate, error, args);
|
||||
}
|
||||
@ -1766,7 +1766,7 @@ gtk_accessible_value_collect_for_property_value (GtkAccessibleProperty propert
|
||||
{
|
||||
const GtkAccessibleCollect *cstate = &collect_props[property];
|
||||
|
||||
g_return_val_if_fail (property <= GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT, NULL);
|
||||
g_return_val_if_fail (property <= GTK_ACCESSIBLE_PROPERTY_HELP_TEXT, NULL);
|
||||
|
||||
return gtk_accessible_value_collect_value (cstate, value, error);
|
||||
}
|
||||
@ -1779,7 +1779,7 @@ gtk_accessible_value_parse_for_property (GtkAccessibleProperty property,
|
||||
{
|
||||
const GtkAccessibleCollect *cstate = &collect_props[property];
|
||||
|
||||
g_return_val_if_fail (property <= GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT, NULL);
|
||||
g_return_val_if_fail (property <= GTK_ACCESSIBLE_PROPERTY_HELP_TEXT, NULL);
|
||||
|
||||
return gtk_accessible_value_parse (cstate, str, len, error);
|
||||
}
|
||||
@ -1800,7 +1800,7 @@ gtk_accessible_property_init_value (GtkAccessibleProperty property,
|
||||
{
|
||||
const GtkAccessibleCollect *cstate = &collect_props[property];
|
||||
|
||||
g_return_if_fail (property <= GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT);
|
||||
g_return_if_fail (property <= GTK_ACCESSIBLE_PROPERTY_HELP_TEXT);
|
||||
|
||||
gtk_accessible_attribute_init_value (cstate, value);
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ const char *
|
||||
gtk_accessible_property_get_attribute_name (GtkAccessibleProperty property)
|
||||
{
|
||||
g_return_val_if_fail (property >= GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE &&
|
||||
property <= GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT,
|
||||
property <= GTK_ACCESSIBLE_PROPERTY_HELP_TEXT,
|
||||
"<none>");
|
||||
|
||||
return property_attrs[property];
|
||||
|
@ -649,6 +649,7 @@ main (int argc, char *argv[])
|
||||
g_test_add_data_func ("/a11y/property/value-min", GUINT_TO_POINTER (GTK_ACCESSIBLE_PROPERTY_VALUE_MIN), test_number_property);
|
||||
g_test_add_data_func ("/a11y/property/value-now", GUINT_TO_POINTER (GTK_ACCESSIBLE_PROPERTY_VALUE_NOW), test_number_property);
|
||||
g_test_add_data_func ("/a11y/property/value-text", GUINT_TO_POINTER (GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT), test_string_property);
|
||||
g_test_add_data_func ("/a11y/property/help-text", GUINT_TO_POINTER (GTK_ACCESSIBLE_PROPERTY_HELP_TEXT), test_string_property);
|
||||
|
||||
g_test_add_func ("/a11y/property/update-multiple", test_update_multiple_properties);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user