test(libSceConvertKeycode): check the keyboard type lookup at both int32 limits at compile time

LookUp is constexpr, so static_assert evaluates it for INT32_MIN and INT32_MAX in a constant expression, where signed overflow is an error. With the previous 32-bit subtraction the test file no longer compiles ('overflow in constant expression'); the existing runtime case for 0x80000000 only showed the overflow under UBSan.
This commit is contained in:
MarcZX10 committed 2026-10-25 12:31:23 +00:00
1 parent db8d2bc1c9
commit 89af2b225e
1 file changed
+3
+3
View File
@@ -15,6 +15,9 @@
static void Require(bool value) { if (!value) std::abort(); }
static_assert(ImeKeyboardType::LookUp(INT32_MIN, 0, 0) == 0);
static_assert(ImeKeyboardType::LookUp(INT32_MAX, 0, 0) == 0);
static void SetLanguage(const char* value) {
#ifdef _WIN32
Require(_putenv_s("ANYPS5_LANGUAGE", value != nullptr ? value : "") == 0);