Arkadiusz Hiler : dinput/tests: Add static asserts for arrays that have to match in size.

Alexandre Julliard julliard at winehq.org
Wed Jan 19 15:57:47 CST 2022


Module: wine
Branch: master
Commit: 2420f7e188e04cb428211aabef8ec2f327b0416f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2420f7e188e04cb428211aabef8ec2f327b0416f

Author: Arkadiusz Hiler <ahiler at codeweavers.com>
Date:   Wed Jan 19 15:04:20 2022 +0200

dinput/tests: Add static asserts for arrays that have to match in size.

Signed-off-by: Arkadiusz Hiler <ahiler at codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dinput/tests/joystick8.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c
index d06b56cbf8c..dd06b1b5185 100644
--- a/dlls/dinput/tests/joystick8.c
+++ b/dlls/dinput/tests/joystick8.c
@@ -2311,6 +2311,9 @@ static BOOL test_device_types( DWORD version )
         },
     };
 
+    C_ASSERT(ARRAY_SIZE(expect_caps) == ARRAY_SIZE(device_desc));
+    C_ASSERT(ARRAY_SIZE(expect_devinst) == ARRAY_SIZE(device_desc));
+
     DIDEVICEINSTANCEW devinst = {.dwSize = sizeof(DIDEVICEINSTANCEW)};
     DIDEVCAPS caps = {.dwSize = sizeof(DIDEVCAPS)};
     WCHAR cwd[MAX_PATH], tempdir[MAX_PATH];




More information about the wine-cvs mailing list