Files
AnyPS5/core/libs/tests/GuestRegMgr.cpp
T

25 lines
772 B
C++

#include "prx/libSceRegMgr/include/Api.hpp"
#include "prx/libc/include/general/VabiMacros.hpp"
#include <cstdint>
#include <cstdlib>
#include <stdexcept>
#include <string>
static void Require(bool value) { if (!value) std::abort(); }
template <typename TCall>
static bool ReportsNotImplemented(const char* name, TCall call) {
try {
call();
} catch (const std::runtime_error& error) {
return std::string(error.what()) == std::string(name) + " not implemented";
}
return false;
}
int main() {
std::int32_t value = 0;
Require(ReportsNotImplemented("sceRegMgrNonSysGetInt", [&] { sceRegMgrNonSysGetInt(0, 0, &value); }));
Require(ReportsNotImplemented("sceRegMgrNonSysGetInt", [&] { sceRegMgrNonSysGetInt(-1, 1, nullptr); }));
}