wintab32/tests: Improve WTInfoA tests.

Some older WACOM tables dont support DVC_Z, DVC_TPRESSURE.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2019-04-29 23:02:23 +00:00 committed by Alexandre Julliard
parent 73568dab0b
commit 911e9dad02
1 changed files with 11 additions and 4 deletions

View File

@ -160,6 +160,9 @@ static void test_WTInfoA(void)
ret = pWTInfoA( WTI_DEVICES, DVC_NAME, name ); ret = pWTInfoA( WTI_DEVICES, DVC_NAME, name );
trace("DVC_NAME %s\n", name); trace("DVC_NAME %s\n", name);
ret = pWTInfoA( WTI_DEVICES, DVC_HARDWARE, name );
trace("DVC_HARDWARE %s\n", name);
ret = pWTInfoA( WTI_DEVICES, DVC_X, &value ); ret = pWTInfoA( WTI_DEVICES, DVC_X, &value );
ok(ret == sizeof( AXIS ), "Wrong DVC_X size %d\n", ret); ok(ret == sizeof( AXIS ), "Wrong DVC_X size %d\n", ret);
trace("DVC_X %d, %d, %d\n", value.axMin, value.axMax, value.axUnits); trace("DVC_X %d, %d, %d\n", value.axMin, value.axMax, value.axUnits);
@ -169,16 +172,20 @@ static void test_WTInfoA(void)
trace("DVC_Y %d, %d, %d\n", value.axMin, value.axMax, value.axUnits); trace("DVC_Y %d, %d, %d\n", value.axMin, value.axMax, value.axUnits);
ret = pWTInfoA( WTI_DEVICES, DVC_Z, &value ); ret = pWTInfoA( WTI_DEVICES, DVC_Z, &value );
todo_wine ok(ret == sizeof( AXIS ), "Wrong DVC_Z size %d\n", ret); if(ret)
trace("DVC_Z %d, %d, %d\n", value.axMin, value.axMax, value.axUnits); trace("DVC_Z %d, %d, %d\n", value.axMin, value.axMax, value.axUnits);
else
trace("DVC_Z not supported\n");
ret = pWTInfoA( WTI_DEVICES, DVC_NPRESSURE, &value ); ret = pWTInfoA( WTI_DEVICES, DVC_NPRESSURE, &value );
ok(ret == sizeof( AXIS ), "Wrong DVC_NPRESSURE, size %d\n", ret); ok(ret == sizeof( AXIS ), "Wrong DVC_NPRESSURE, size %d\n", ret);
trace("DVC_NPRESSURE %d, %d, %d\n", value.axMin, value.axMax, value.axUnits); trace("DVC_NPRESSURE %d, %d, %d\n", value.axMin, value.axMax, value.axUnits);
ret = pWTInfoA( WTI_DEVICES, DVC_TPRESSURE, &value ); ret = pWTInfoA( WTI_DEVICES, DVC_TPRESSURE, &value );
todo_wine ok(ret == sizeof( AXIS ), "Wrong DVC_TPRESSURE, size %d\n", ret); if(ret)
trace("DVC_TPRESSURE %d, %d, %d\n", value.axMin, value.axMax, value.axUnits); trace("DVC_TPRESSURE %d, %d, %d\n", value.axMin, value.axMax, value.axUnits);
else
trace("DVC_TPRESSURE not supported\n");
ret = pWTInfoA( WTI_DEVICES, DVC_ORIENTATION, &orientation ); ret = pWTInfoA( WTI_DEVICES, DVC_ORIENTATION, &orientation );
ok(ret == sizeof( AXIS )*3, "Wrong DVC_ORIENTATION, size %d\n", ret); ok(ret == sizeof( AXIS )*3, "Wrong DVC_ORIENTATION, size %d\n", ret);