Re: [g-a-devel]test-simple patch ...



Marc Mulcahy wrote:
> 
> These look right to me.  I think we reserved the magic cookie -1 for
> getting the entire string from an AccessibleText, but MAXINT should also
> work I'd think.
> 
> Marc

I still think -1 is better, and:

(1) it preserves the API as it is already in use;
(2) it matches the ATK API (which in turn matches GTK+).

Also I don't like the flavor of the
"key impl impossibly broken" printf, and
I am not convinced that commenting out the
regression test is the right thing to do, given that it
only fails on one system that I know of (ben's).

I suggest that we should keep the test and
make it's failure non-fatal, so that we can
continue to detect even more severe regressions and
possibly accumulate evidence about the existing failure(s).

regards,

-Bill

> At 07:58 PM 3/4/2002 +0000, Michael Meeks wrote:
> >         Again, it seems no one is running the regression tests, or expanding
> >them, or maintaining them. Very, tedious indeed.
> >
> >         Please, please run 'make check' before committing.
> >
> >         May I commit these (obvious) fixes ? also we should add some build
> >sherrif blurb to atk, gail and at-spi - that is if you have no
> >objections ? may I do that ?
> >
> >         Regards,
> >
> >                 Michael.
> >
> >Index: ChangeLog
> >===================================================================
> >RCS file: /cvs/gnome/at-spi/ChangeLog,v
> >retrieving revision 1.160
> >diff -u -p -u -r1.160 ChangeLog
> >--- ChangeLog   2002/02/26 18:30:49     1.160
> >+++ ChangeLog   2002/03/04 19:56:17
> >@@ -1,12 +1,25 @@
> >+2002-03-04  Michael Meeks  <michael ximian com>
> >+
> >+       * test/test-simple.c (test_editable_text),
> >+       (test_text): pass G_MAXINT instead of '-1' for
> >+       whole string - is this a good thing !?
> >+
> >+       * cspi/spi_accessible.c
> >+       (Accessible_getRelationSet): fix crasher bug
> >+       overwriting the end of the array.
> >+
> >+       * test/test-simple.c (validate_accessible): free,
> >+       not g_free returned relation set.
> >+
> >  2002-02-26 Marc Mulcahy <marc mulcahy sun com>
> >
> >-       libspi/stateset.c libspi/stateset.h libspi/Makefile.am:
> >+       * libspi/stateset.c libspi/stateset.h libspi/Makefile.am:
> >         implemented stateset support
> >
> >-       idl/Accessibility_State.idl: Made necessary changes to the IDL to
> >-       support state sets.
> >+       * idl/Accessibility_State.idl: Made necessary changes to
> >+       the IDL to support state sets.
> >
> >-       2002-02-12 Bill Haneman <bill haneman sun com>
> >+2002-02-12 Bill Haneman <bill haneman sun com>
> >
> >         * registryd/deviceeventcontroller.c:
> >         Added implementation for generateMouseEvent.
> >Index: cspi/spi_accessible.c
> >===================================================================
> >RCS file: /cvs/gnome/at-spi/cspi/spi_accessible.c,v
> >retrieving revision 1.32
> >diff -u -p -u -r1.32 spi_accessible.c
> >--- cspi/spi_accessible.c       2002/01/24 12:41:08     1.32
> >+++ cspi/spi_accessible.c       2002/03/04 19:56:17
> >@@ -397,9 +397,8 @@ Accessible_getRelationSet (Accessible *o
> >
> >    cspi_return_val_if_ev ("getRelationSet", NULL);
> >
> >-  /* this looks hack-ish, but it's based on the CORBA C bindings spec */
> >    n_relations = relation_set->_length;
> >-  relations = malloc (sizeof (AccessibleRelation *) * n_relations);
> >+  relations = malloc (sizeof (AccessibleRelation *) * (n_relations + 1));
> >
> >    for (i = 0; i < n_relations; ++i)
> >      {
> >Index: test/test-simple.c
> >===================================================================
> >RCS file: /cvs/gnome/at-spi/test/test-simple.c,v
> >retrieving revision 1.24
> >diff -u -p -u -r1.24 test-simple.c
> >--- test/test-simple.c  2002/02/12 22:56:06     1.24
> >+++ test/test-simple.c  2002/03/04 19:56:17
> >@@ -243,7 +243,7 @@ test_editable_text (AccessibleEditableTe
> >         AccessibleEditableText_setTextContents (
> >                 etext, TEST_STRING_B);
> >
> >-       str = AccessibleText_getText (text, 0, -1);
> >+       str = AccessibleText_getText (text, 0, G_MAXINT);
> >         g_assert (!strcmp (str, TEST_STRING_B));
> >
> >         SPI_freeString (str);
> >@@ -295,7 +295,7 @@ test_text (AccessibleText *text)
> >         g_assert (AccessibleText_getCharacterCount (text) ==
> >                   strlen (TEST_STRING_A));
> >
> >-       str = AccessibleText_getText (text, 0, -1);
> >+       str = AccessibleText_getText (text, 0, G_MAXINT);
> >         g_assert (!strcmp (str, TEST_STRING_A));
> >         SPI_freeString (str);
> >
> >@@ -496,7 +496,7 @@ validate_accessible (Accessible *accessi
> >                 AccessibleRelation_unref (relations [i]);
> >                 relations [i] = NULL;
> >         }
> >-       g_free (relations);
> >+       free (relations);
> >
> >         if (print_tree) {
> >                 int i;
> >@@ -685,6 +685,7 @@ test_keylisteners (void)
> >
> >         fprintf (stderr, "Testing keyboard listeners ...\n");
> >
> >+#if 0
> >         key_listener = SPI_createAccessibleKeystrokeListener (
> >                 key_listener_cb, &stroke);
> >
> >@@ -719,6 +720,9 @@ test_keylisteners (void)
> >          g_assert (SPI_generateMouseEvent (-1, -1, "b1c"));
> >
> >         AccessibleKeystrokeListener_unref (key_listener);
> >+#else
> >+       fprintf (stderr, " key impl. impossibly broken\n");
> >+#endif
> >  }
> >
> >  int
> >
> >--
> >  mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot
> >
> >_______________________________________________
> >Gnome-accessibility-devel mailing list
> >Gnome-accessibility-devel gnome org
> >http://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel



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