}
static void
+test_table (AccessibleTable *table)
+{
+ char *str;
+ gint index;
+ gint rows, columns;
+
+ fprintf (stderr, "Testing table ...\n");
+
+ rows = AccessibleTable_getNRows (table);
+ g_assert (rows > 0);
+
+ columns = AccessibleTable_getNColumns (table);
+ g_assert (columns > 0);
+
+ index = AccessibleTable_getIndexAt (table, rows-1, columns-1);
+
+ g_assert (AccessibleTable_getRowAtIndex (table, index) == rows-1);
+
+ g_assert (AccessibleTable_getColumnAtIndex (table, index) == columns-1);
+
+ g_assert (AccessibleTable_getColumnHeader (table, 0)); /* maybe bogus assertion */
+
+ /* FIXME: lots more tests */
+}
+
+static void
test_text (AccessibleText *text)
{
char *str;
AccessibleText_setCaretOffset (text, 7);
g_assert (AccessibleText_getCaretOffset (text) == 7);
+ AccessibleText_isSelected (text, 0, 0); /* no assertion, but see if warnings are thrown */
+
/* FIXME: lots more tests - selections etc. etc. */
}
g_assert (tmp != NULL);
if (print_tree)
fprintf (stderr, "Ta");
+ else
+ test_table (tmp);
AccessibleTable_unref (tmp);
}
if (print_tree)
fprintf (stderr, "Va");
else
- ; /* test_value (tmp); */
+ test_value (tmp);
AccessibleValue_unref (tmp);
}