test: Correct invalid enum length.

Ensure that they can't break like this again.
This commit is contained in:
Eddy Jansson 2022-04-28 20:57:20 +02:00 committed by Sam Lantinga
parent 0f45a4e303
commit 5c1f5a7306
1 changed files with 3 additions and 1 deletions

View File

@ -8,7 +8,6 @@
#include "SDL_test.h" #include "SDL_test.h"
const int _numHintsEnum = 25;
const char* _HintsEnum[] = const char* _HintsEnum[] =
{ {
SDL_HINT_ACCELEROMETER_AS_JOYSTICK, SDL_HINT_ACCELEROMETER_AS_JOYSTICK,
@ -62,6 +61,9 @@ const char* _HintsVerbose[] =
"SDL_XINPUT_ENABLED" "SDL_XINPUT_ENABLED"
}; };
SDL_COMPILE_TIME_ASSERT(HintsEnum, SDL_arraysize(_HintsEnum) == SDL_arraysize(_HintsVerbose));
const int _numHintsEnum = SDL_arraysize(_HintsEnum);
/* Test case functions */ /* Test case functions */