diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2011-06-24 14:11:39 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2011-06-27 13:27:17 +0100 |
commit | fb649060ae10c48d7bee2343119d495de1474ad4 (patch) | |
tree | c6c9ce38afd4aa4c80557896d7896f5d6bf8b39e /test | |
parent | 601504cb32855c90b531265b9da27522a85c978e (diff) | |
parent | d784fd09dc277610d5f4e98d577c4fdcd9215f9c (diff) |
Merge commit 'xorg-server-1.10.2' into cygwin-release-1.10xserver-cygwin-1.10.2-1
Conflicts:
configure.ac
glx/Makefile.am
glx/glapi.c
glx/glxext.c
Diffstat (limited to 'test')
-rw-r--r-- | test/input.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/test/input.c b/test/input.c index e0e9e6af7..4d840b9b4 100644 --- a/test/input.c +++ b/test/input.c @@ -1199,6 +1199,28 @@ static void include_bit_test_macros(void) } } +/** + * Ensure that val->axisVal and val->axes are aligned on doubles. + */ +static void dix_valuator_alloc(void) +{ + ValuatorClassPtr v = NULL; + int num_axes = 0; + + while (num_axes < 5) + { + v = AllocValuatorClass(v, num_axes); + + g_assert(v); + g_assert(v->numAxes == num_axes); + g_assert(((void*)v->axisVal - (void*)v) % sizeof(double) == 0); + g_assert(((void*)v->axes - (void*)v) % sizeof(double) == 0); + num_axes ++; + } + + free(v); +} + int main(int argc, char** argv) { g_test_init(&argc, &argv,NULL); @@ -1216,7 +1238,7 @@ int main(int argc, char** argv) g_test_add_func("/include/byte_padding_macros", include_byte_padding_macros); g_test_add_func("/include/bit_test_macros", include_bit_test_macros); g_test_add_func("/Xi/xiproperty/register-unregister", xi_unregister_handlers); - + g_test_add_func("/dix/input/valuator-alloc", dix_valuator_alloc); return g_test_run(); } |