mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-30 12:25:49 +00:00
35 lines
845 B
C++
35 lines
845 B
C++
#include "prx/libSceSaveData.native/include/Api.hpp"
|
|
#include "prx/libc/include/general/VabiMacros.hpp"
|
|
#include <cstdio>
|
|
#include <cstdint>
|
|
#include <cstdlib>
|
|
#include <stdexcept>
|
|
#include <string>
|
|
|
|
namespace {
|
|
|
|
void Require(bool value, const char* message) {
|
|
if (!value) {
|
|
std::fprintf(stderr, "%s\n", message);
|
|
std::abort();
|
|
}
|
|
}
|
|
|
|
template <typename TCall>
|
|
void RequireThrows(TCall call, const std::string& expectedMessage) {
|
|
try {
|
|
call();
|
|
} catch (const std::runtime_error& error) {
|
|
Require(std::string(error.what()) == expectedMessage, "unexpected error message");
|
|
return;
|
|
}
|
|
Require(false, "call returned instead of reporting that it is not implemented");
|
|
}
|
|
|
|
}
|
|
|
|
int main() {
|
|
RequireThrows([] { sceSaveDataCancel(0); }, "sceSaveDataCancel not implemented");
|
|
return 0;
|
|
}
|