[Spice-devel] [spice-gtk 7/9] Implements set_keyboard_lock_modifiers for Windows
Marc-André Lureau
mlureau at redhat.com
Wed Jun 8 13:18:34 UTC 2016
Hi
----- Original Message -----
> > > index 0000000..9c7dfba
> > > --- /dev/null
> > > +++ b/tests/keyboard-test.c
> > > @@ -0,0 +1,9 @@
> > > +#define KEYBOARD_MODIFIERS_TEST 1
> > > +
> > > +#include "../src/keyboard-modifiers.c"
> >
> > I would rather not include the C file, but have the test code in this file
> > (like the rest of the tests)
> >
>
> Yes, quite a bad hack.
>
> There were some reason to do these hacks:
> - having an executable not relying on Gtk so to have to copy a single
> .exe file and launch it;
That would be an exception, I don't think we need that.
> - use a static, not exported, function in spice-gtk;
We link the tests with the static library for that reaosn
> - avoid to add ../src/keyboard-modifiers.c in tests/Makefile.am which
> give errors.
No need for that then
>
> First point is no more a big issue (already tested).
>
> I'm pondering (beside moving test functions) to add a library to
> src/Makefile.am to provide functions required (keyboard_cache).
>
> Any opinion?
Beside that, although I like to think I am flexible in this regard, the code style is quite foreign from spice-gtk, if only the doc style (we barely use // comment style for ex, we don't use @param etc).
> Frediano
>
> > > +
> > > +int main(void)
> > > +{
> > > + keyboard_modifiers_test();
> > > + return 0;
> > > +}
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
>
More information about the Spice-devel
mailing list