mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 00:22:57 -05:00
test(libSceConvertKeycode): cover sceConvertKeycodeGetImeKeyboardType
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0f2683cb7d
commit
0afa191660
2 files changed
+45
No files matched your search
@@ -0,0 +1,30 @@
|
||||
#include "SceTypes.hpp"
|
||||
#include "prx/libc/include/general/VabiMacros.hpp"
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
|
||||
extern "C" {
|
||||
int APS5_VABI sceConvertKeycodeGetImeKeyboardType(std::int32_t, std::uint32_t*);
|
||||
}
|
||||
|
||||
static void Require(bool value) { if (!value) std::abort(); }
|
||||
|
||||
int main() {
|
||||
constexpr int invalidAddress = static_cast<int>(0x80BC0031u);
|
||||
constexpr int invalidUserId = static_cast<int>(0x80BC0010u);
|
||||
|
||||
Require(sceConvertKeycodeGetImeKeyboardType(0, nullptr) == invalidAddress);
|
||||
Require(sceConvertKeycodeGetImeKeyboardType(-1, nullptr) == invalidAddress);
|
||||
|
||||
std::uint32_t type = 0xFFFFFFFFu;
|
||||
Require(sceConvertKeycodeGetImeKeyboardType(-1, &type) == invalidUserId);
|
||||
Require(type == 0xFFFFFFFFu);
|
||||
|
||||
Require(sceConvertKeycodeGetImeKeyboardType(0, &type) == 0);
|
||||
Require(type == 0);
|
||||
|
||||
type = 0xFFFFFFFFu;
|
||||
Require(sceConvertKeycodeGetImeKeyboardType(1, &type) == 0);
|
||||
Require(type == 0);
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user